OrientedVirtualizingPanel.CanHorizontallyScroll Property


Gets or sets a value that determines how the OrientedVirtualizingPanel measures space for child elements for possible scrolling in the horizontal dimension.

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.Primitives.OrientedVirtualizingPanel.CanHorizontallyScroll.

 property bool CanHorizontallyScroll { bool get(); void set(bool value); };
bool CanHorizontallyScroll();

void CanHorizontallyScroll(bool value);
public bool CanHorizontallyScroll { get; set; }
var boolean = orientedVirtualizingPanel.canHorizontallyScroll;
orientedVirtualizingPanel.canHorizontallyScroll = boolean;
Public Property CanHorizontallyScroll As Boolean

Property Value


true to support a potentially infinite horizontal layout dimension. false to restrict to available size.



This property is not intended to be set in XAML. You can set the panel's Orientation property in XAML and optionally change the ScrollViewer.HorizontalScrollBarVisibility or ScrollViewer.VerticalScrollBarVisibility to change how scrolling works. This property can be changed in code. In some cases you will need to use VisualTreeHelper to access the panel.

Applies to