Редагувати

Поділитися через


DataGrid.EnableRowVirtualization Property

Definition

Gets or sets a value that indicates whether row virtualization is enabled.

public:
 property bool EnableRowVirtualization { bool get(); void set(bool value); };
public bool EnableRowVirtualization { get; set; }
member this.EnableRowVirtualization : bool with get, set
Public Property EnableRowVirtualization As Boolean

Property Value

true if row virtualization is enabled; otherwise, false. The registered default is true. For more information about what can influence the value, see DependencyProperty.

Remarks

To improve performance, the EnableRowVirtualization property is set to true by default. When the EnableRowVirtualization property is set to true, the DataGrid does not instantiate a DataGridRow object for each data item in the bound data source. Instead, the DataGrid creates DataGridRow objects only when they are needed, and reuses them as much as it can. For example, the DataGrid creates a DataGridRow object for each data item that is currently in view and recycles the row when it scrolls out of view.

Applies to

See also