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
IsGridLayoutEnabledProperty
public static readonly DependencyProperty IsGridLayoutEnabledProperty
Field Value
ItemSizeProperty
public static readonly DependencyProperty ItemSizeProperty
Field Value
ItemSizeProviderProperty
public static readonly DependencyProperty ItemSizeProviderProperty
Field Value
OrientationProperty
public static readonly DependencyProperty OrientationProperty
Field Value
SpacingModeProperty
public static readonly DependencyProperty SpacingModeProperty
Field Value
StretchItemsProperty
public static readonly DependencyProperty StretchItemsProperty
Field Value
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
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
IsGridLayoutEnabled
Specifies whether the items are arranged in a grid-like layout. The default value is true
.
When set to true
, the items are arranged based on the number of items that can fit in a row.
When set to false
, the items are arranged based on the number of items that are actually placed in the row.
public bool IsGridLayoutEnabled { get; set; }
Property Value
Remarks
If AllowDifferentSizedItems is enabled, this property has no effect and the items are always arranged based on the number of items that are actually placed in the row.
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
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
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
SpacingMode
Gets or sets the spacing mode used when arranging the items. The default value is Uniform.
public SpacingMode SpacingMode { get; set; }
Property Value
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
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
SizeThe 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
intThe index position of the item that is generated and made visible.
ClearItemSizeCache()
public void ClearItemSizeCache()
GetLineDownScrollAmount()
protected override double GetLineDownScrollAmount()
Returns
GetLineLeftScrollAmount()
protected override double GetLineLeftScrollAmount()
Returns
GetLineRightScrollAmount()
protected override double GetLineRightScrollAmount()
Returns
GetLineUpScrollAmount()
protected override double GetLineUpScrollAmount()
Returns
GetMouseWheelDownScrollAmount()
protected override double GetMouseWheelDownScrollAmount()
Returns
GetMouseWheelLeftScrollAmount()
protected override double GetMouseWheelLeftScrollAmount()
Returns
GetMouseWheelRightScrollAmount()
protected override double GetMouseWheelRightScrollAmount()
Returns
GetMouseWheelUpScrollAmount()
protected override double GetMouseWheelUpScrollAmount()
Returns
GetPageDownScrollAmount()
protected override double GetPageDownScrollAmount()
Returns
GetPageLeftScrollAmount()
protected override double GetPageLeftScrollAmount()
Returns
GetPageRightScrollAmount()
protected override double GetPageRightScrollAmount()
Returns
GetPageUpScrollAmount()
protected override double GetPageUpScrollAmount()
Returns
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
SizeThe 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.