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 プロパティは、ScrollPresenterMeasureOverride動作に影響します。

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

適用対象