-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Controls.VirtualizingStackPanel |
winrt class |
Arranges and virtualizes content on a single line that is oriented either horizontally or vertically. Can only be used to display items in an ItemsControl.
<VirtualizingStackPanel .../>
-or-
<VirtualizingStackPanel ...>
oneOrMoreChildren
</VirtualizingStackPanel>
VirtualizingStackPanel can only be used to display items in an ItemsControl. A primary scenario for VirtualizingStackPanel is that it provides the items panel template behavior for FlipView and ListBox in default templates.
Note
Starting in Windows 8.1, ItemsStackPanel is used as the default ItemsPanel for ListView. If you modify the ItemsPanel, we recommend you use ItemsStackPanel or ItemsWrapGrid instead of VirtualizingStackPanel or WrapGrid.
VirtualizingStackPanel is the host service class for several XAML attached properties.
In order to support XAML processor access to the attached properties, and also to expose equivalent get and set operations to code, each XAML attached property has a pair of Get and Set accessor methods. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing the identifier field as the dependency property identifier.
Attached property | Description |
---|---|
IsVirtualizing | See Remarks on property page. |
VirtualizationMode | Gets or sets a value that indicates the virtualization mode of items being virtualized by a parent VirtualizingStackPanel and items set. |
OrientedVirtualizingPanel, IScrollSnapPointsInfo, ItemsControl.ItemsPanel, ItemsPanelTemplate, Quickstart: Adding ListView and GridView controls