Share via


ScrollView.ContentOrientation プロパティ

定義

コンテンツが水平方向または垂直方向にスクロールするかどうかを示す値を取得または設定します。

public:
 property ScrollingContentOrientation ContentOrientation { ScrollingContentOrientation get(); void set(ScrollingContentOrientation value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
ScrollingContentOrientation ContentOrientation();

void ContentOrientation(ScrollingContentOrientation value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
ScrollingContentOrientation ContentOrientation();

void ContentOrientation(ScrollingContentOrientation value);
public ScrollingContentOrientation ContentOrientation { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")]
public ScrollingContentOrientation ContentOrientation { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollView::s_defaultContentOrientation")] set; }
var scrollingContentOrientation = scrollView.contentOrientation;
scrollView.contentOrientation = scrollingContentOrientation;
Public Property ContentOrientation As ScrollingContentOrientation

プロパティ値

コンテンツの優先スクロール方向。 既定値は、Vertical です。

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

注釈

プロパティは ContentOrientation の動作に影響しますMeasureOverrideScrollPresenter

  • 方向を Vertical 適用すると、 の使用可能な幅 ScrollPresenter.Content が の使用可能な幅に設定されます ScrollPresenter。 それ以外の場合、 の ScrollPresenter.Content 使用可能な幅は無限大です。
  • 方向を Horizontal 適用すると、 の使用可能な高さが ScrollPresenter.Content の使用可能な高さに設定されます ScrollPresenter。 それ以外の場合、 の使用可能な高さは ScrollPresenter.Content 無限大です。

適用対象