Table of Contents

Class VirtualizingWrapPanel

Namespace
Wpf.Ui.Controls
Assembly
Wpf.Ui.dll
public class VirtualizingWrapPanel : VirtualizingPanelBase, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IScrollInfo
Inheritance
VirtualizingWrapPanel
Implements
Inherited Members

Fields

ItemSizeProperty

Identifies the ItemSize dependency property.

public static readonly DependencyProperty ItemSizeProperty

Field Value

DependencyProperty

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

ChildSize

Gets or sets the size of the single child element.

protected Size ChildSize { get; set; }

Property Value

Size

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

ItemsPerRowCount

Gets or sets the amount of displayed items per row.

protected int ItemsPerRowCount { get; set; }

Property Value

int

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

RowCount

Gets or sets the amount of the displayed rows.

protected int RowCount { get; set; }

Property Value

int

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

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.

CalculateChildArrangeSize(Size)

Calculates desired child arrange size.

protected Size CalculateChildArrangeSize(Size finalSize)

Parameters

finalSize Size

Returns

Size

CalculateExtent(Size)

Calculates the extent that would be needed to show all items.

protected override Size CalculateExtent(Size availableSize)

Parameters

availableSize Size

Returns

Size

CalculateSpacing(Size, out double, out double)

Calculates desired spacing between items.

protected void CalculateSpacing(Size finalSize, out double innerSpacing, out double outerSpacing)

Parameters

finalSize Size
innerSpacing double
outerSpacing double

CreateRect(double, double, double, double)

Defines panel coordinates and size.

protected Rect CreateRect(double x, double y, double width, double height)

Parameters

x double
y double
width double
height double

Returns

Rect

CreateSize(double, double)

Defines panel size.

protected Size CreateSize(double width, double height)

Parameters

width double
height double

Returns

Size

GetHeight(Size)

Gets panel height.

protected double GetHeight(Size size)

Parameters

size Size

Returns

double

GetLineDownScrollAmount()

Gets line down scroll amount.

protected override double GetLineDownScrollAmount()

Returns

double

GetLineLeftScrollAmount()

Gets line left scroll amount.

protected override double GetLineLeftScrollAmount()

Returns

double

GetLineRightScrollAmount()

Gets line right scroll amount.

protected override double GetLineRightScrollAmount()

Returns

double

GetLineUpScrollAmount()

Gets line up scroll amount.

protected override double GetLineUpScrollAmount()

Returns

double

GetMouseWheelDownScrollAmount()

Gets mouse wheel down scroll amount.

protected override double GetMouseWheelDownScrollAmount()

Returns

double

GetMouseWheelLeftScrollAmount()

Gets mouse wheel left scroll amount.

protected override double GetMouseWheelLeftScrollAmount()

Returns

double

GetMouseWheelRightScrollAmount()

Gets mouse wheel right scroll amount.

protected override double GetMouseWheelRightScrollAmount()

Returns

double

GetMouseWheelUpScrollAmount()

Gets mouse wheel up scroll amount.

protected override double GetMouseWheelUpScrollAmount()

Returns

double

GetPageDownScrollAmount()

Gets page down scroll amount.

protected override double GetPageDownScrollAmount()

Returns

double

GetPageLeftScrollAmount()

Gets page left scroll amount.

protected override double GetPageLeftScrollAmount()

Returns

double

GetPageRightScrollAmount()

Gets page right scroll amount.

protected override double GetPageRightScrollAmount()

Returns

double

GetPageUpScrollAmount()

Gets page up scroll amount.

protected override double GetPageUpScrollAmount()

Returns

double

GetWidth(Size)

Gets panel width.

protected double GetWidth(Size size)

Parameters

size Size

Returns

double

GetX(Point)

Gets X panel orientation.

protected double GetX(Point point)

Parameters

point Point

Returns

double

GetY(Point)

Gets Y panel orientation.

protected double GetY(Point point)

Parameters

point Point

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.

OnOrientationChanged()

This virtual method is called when Orientation is changed.

protected virtual void OnOrientationChanged()

UpdateItemRange()

Calculates the item range that is visible in the viewport or cached.

protected override ItemRange UpdateItemRange()

Returns

ItemRange