Table of Contents

Class VirtualizingGridView

Namespace
Wpf.Ui.Controls
Assembly
Wpf.Ui.dll

Simple control that displays a gird of items. Depending on the orientation, the items are either stacked horizontally or vertically until the items are wrapped to the next row or column. The control is using virtualization to support large amount of items.

In order to work properly all items must have the same size.

Based on https://github.com/sbaeumlisberger/VirtualizingWrapPanel.

public class VirtualizingGridView : ListView, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage
Inheritance
VirtualizingGridView
Implements
Inherited Members

Constructors

VirtualizingGridView()

public VirtualizingGridView()

Fields

OrientationProperty

Identifies the Orientation dependency property.

public static readonly DependencyProperty OrientationProperty

Field Value

DependencyProperty

SpacingModeProperty

Identifies the SpacingMode dependency property.

public static readonly DependencyProperty SpacingModeProperty

Field Value

DependencyProperty

StretchItemsProperty

Identifies the StretchItems dependency property.

public static readonly DependencyProperty StretchItemsProperty

Field Value

DependencyProperty

Properties

Orientation

Gets or sets a value that specifies the orientation in which items are arranged. The default value is Vertical.

public Orientation Orientation { get; set; }

Property Value

Orientation

SpacingMode

Gets or sets the spacing mode used when arranging the items. The default value is Uniform.

public SpacingMode SpacingMode { get; set; }

Property Value

SpacingMode

StretchItems

Gets or sets a value indicating whether the items get stretched to fill up remaining space. The default value is false.

public bool StretchItems { get; set; }

Property Value

bool

Remarks

The MaxWidth and MaxHeight properties of the ItemContainerStyle can be used to limit the stretching. In this case the use of the remaining space will be determined by the SpacingMode property.

Methods

InitializeItemsPanel()

Initializes the ItemsPanel with VirtualizingWrapPanel.

protected virtual void InitializeItemsPanel()

OnInitialized(EventArgs)

Raises the Initialized event. This method is invoked whenever IsInitialized is set to true internally.

protected override void OnInitialized(EventArgs e)

Parameters

e EventArgs

The RoutedEventArgs that contains the event data.