Table of Contents

Class VirtualizingWrapPanelWithItemExpansion

Namespace
WpfToolkit.Controls
Assembly
VirtualizingWrapPanel.dll

A implementation of a wrap panel that supports virtualization and can be used in horizontal and vertical orientation. In addition the panel allows to expand one specific item.

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

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

Fields

ExpandedItemProperty

public static readonly DependencyProperty ExpandedItemProperty

Field Value

DependencyProperty

ExpandedItemTemplateProperty

public static readonly DependencyProperty ExpandedItemTemplateProperty

Field Value

DependencyProperty

ItemSizeProperty

public static readonly DependencyProperty ItemSizeProperty

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

ExpandedItem

Gets or set the expanded item. The default value is null.

public object? ExpandedItem { get; set; }

Property Value

object

ExpandedItemTemplate

Gets or sets the data template used for the item expansion.

public DataTemplate? ExpandedItemTemplate { get; set; }

Property Value

DataTemplate

ItemSize

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

public Size ItemSize { get; set; }

Property Value

Size

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 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.

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.

OnClearChildren()

Called when the collection of child elements is cleared by the base Panel class.

protected override void OnClearChildren()

OnItemsChanged(object, ItemsChangedEventArgs)

Called when the Items collection that is associated with the ItemsControl for this Panel changes.

protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)

Parameters

sender object

The object that raised the event.

args ItemsChangedEventArgs

Provides data for the ItemsChanged event.