VirtualizingStackPanel.SetIsVirtualizing(DependencyObject, Boolean) 方法

定义

设置附加属性的值 IsVirtualizingProperty

public:
 static void SetIsVirtualizing(System::Windows::DependencyObject ^ element, bool value);
public static void SetIsVirtualizing(System.Windows.DependencyObject element, bool value);
static member SetIsVirtualizing : System.Windows.DependencyObject * bool -> unit
Public Shared Sub SetIsVirtualizing (element As DependencyObject, value As Boolean)

参数

element
DependencyObject

将附加属性值设置为的对象。

value
Boolean

true 如果正在虚拟化, VirtualizingStackPanel 则为 .;否则为 false

注解

标准布局系统为与列表控件关联的每个项创建项容器和计算布局。 “虚拟化”一词是指基于屏幕上可见的项从更多数据项生成 UI 元素子集的技术。 当只有少数元素可能在屏幕上时生成许多 UI 元素可能会对应用程序的性能产生不利影响。 计算 VirtualizingStackPanel 可见项的数量,并使用 ItemContainerGenerator ItemsControl(如 ListBoxListView)创建 UI 元素,仅针对可见项创建 UI 元素。

适用于