Table of Contents

Class VirtualizingWrapPanel

Namespace
WpfToolkit.Controls
Assembly
VirtualizingWrapPanel.dll

A implementation of a wrap panel that supports virtualization and can be used in horizontal and vertical orientation.

public class VirtualizingWrapPanel : VirtualizingPanelBase, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IScrollInfo
Inheritance
VirtualizingWrapPanel
Implements
Inherited Members

Fields

AllowDifferentSizedItemsProperty

public static readonly DependencyProperty AllowDifferentSizedItemsProperty

Field Value

DependencyProperty

ItemSizeProperty

public static readonly DependencyProperty ItemSizeProperty

Field Value

DependencyProperty

ItemSizeProviderProperty

public static readonly DependencyProperty ItemSizeProviderProperty

Field Value

DependencyProperty

OrientationProperty

public static readonly DependencyProperty OrientationProperty

Field Value

DependencyProperty

SpacingModeProperty

public static readonly DependencyProperty SpacingModeProperty

Field Value

DependencyProperty

StretchItemsProperty

public static readonly DependencyProperty StretchItemsProperty

Field Value

DependencyProperty

Properties

AllowDifferentSizedItems

Specifies whether items can have different sizes. The default value is false. If this property is enabled, it is strongly recommended to also set the ItemSizeProvider property. Otherwise, the position of the items is not always guaranteed to be correct.

public bool AllowDifferentSizedItems { get; set; }

Property Value

bool

CanHierarchicallyScrollAndVirtualizeCore

Gets value that indicates whether the VirtualizingPanel can virtualize items that are grouped or organized in a hierarchy.

protected override bool CanHierarchicallyScrollAndVirtualizeCore { get; }

Property Value

bool

always true for VirtualizingWrapPanel

HasLogicalOrientation

Gets a value that indicates whether this Panel arranges its descendants in a single dimension.

protected override bool HasLogicalOrientation { get; }

Property Value

bool

true if the orientation of the Panel is in one dimension; otherwise, false.

ItemSize

Gets or sets a value that specifies the size of the items. The default value is Empty. If the value is Empty the item size is determined by measuring the first realized item.

public Size ItemSize { get; set; }

Property Value

Size

ItemSizeProvider

Specifies an instance of IItemSizeProvider which provides the size of the items. In order to allow different sized items, also enable the AllowDifferentSizedItems property.

public IItemSizeProvider? ItemSizeProvider { get; set; }

Property Value

IItemSizeProvider

LogicalOrientation

The Orientation of the panel, if the panel supports layout in only a single dimension.

protected override Orientation LogicalOrientation { get; }

Property Value

Orientation

The Orientation of the panel. This property has no default value.

Orientation

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

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 that specifies if 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

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)

Parameters

finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size

The actual size used.

BringIndexIntoView(int)

When implemented in a derived class, generates the item at the specified index location and makes it visible.

protected override void BringIndexIntoView(int index)

Parameters

index int

The index position of the item that is generated and made visible.

ClearItemSizeCache()

public void ClearItemSizeCache()

GetLineDownScrollAmount()

protected override double GetLineDownScrollAmount()

Returns

double

GetLineLeftScrollAmount()

protected override double GetLineLeftScrollAmount()

Returns

double

GetLineRightScrollAmount()

protected override double GetLineRightScrollAmount()

Returns

double

GetLineUpScrollAmount()

protected override double GetLineUpScrollAmount()

Returns

double

GetMouseWheelDownScrollAmount()

protected override double GetMouseWheelDownScrollAmount()

Returns

double

GetMouseWheelLeftScrollAmount()

protected override double GetMouseWheelLeftScrollAmount()

Returns

double

GetMouseWheelRightScrollAmount()

protected override double GetMouseWheelRightScrollAmount()

Returns

double

GetMouseWheelUpScrollAmount()

protected override double GetMouseWheelUpScrollAmount()

Returns

double

GetPageDownScrollAmount()

protected override double GetPageDownScrollAmount()

Returns

double

GetPageLeftScrollAmount()

protected override double GetPageLeftScrollAmount()

Returns

double

GetPageRightScrollAmount()

protected override double GetPageRightScrollAmount()

Returns

double

GetPageUpScrollAmount()

protected override double GetPageUpScrollAmount()

Returns

double

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size

The size that this element determines it needs during layout, based on its calculations of child element sizes.