Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ScrollView.ContentOrientation Property
Definition
- Namespace:
- Microsoft.UI.Xaml.Controls
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether the content prefers to scroll horizontally or vertically.
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
Property Value
The preferred scroll direction of the content. The default is Vertical.
- Attributes
-
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute
Remarks
The ContentOrientation property affects the ScrollPresenter's MeasureOverride behavior:
- When the
Verticalorientation is applied, the available width of theScrollPresenter.Contentis set to the available width of theScrollPresenter. Otherwise, the available width of theScrollPresenter.Contentis infinity. - When the
Horizontalorientation is applied, the available height of theScrollPresenter.Contentis set to the available height of theScrollPresenter. Otherwise, the available height of theScrollPresenter.Contentis infinity.
Applies to
Feedback
Was this page helpful?
