Class VirtualizingWrapPanel
Extended base class for VirtualizingPanel.
Based on https://github.com/sbaeumlisberger/VirtualizingWrapPanel.
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
OrientationProperty
Identifies the Orientation dependency property.
public static readonly DependencyProperty OrientationProperty
Field Value
SpacingModeProperty
Identifies the SpacingMode dependency property.
public static readonly DependencyProperty SpacingModeProperty
Field Value
StretchItemsProperty
Identifies the StretchItems dependency property.
public static readonly DependencyProperty StretchItemsProperty
Field Value
Properties
ChildSize
Gets or sets the size of the single child element.
protected Size ChildSize { get; set; }
Property Value
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
ItemsPerRowCount
Gets or sets the amount of displayed items per row.
protected int ItemsPerRowCount { get; set; }
Property Value
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
RowCount
Gets or sets the amount of the displayed rows.
protected int RowCount { 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 indicating whether 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.
CalculateChildArrangeSize(Size)
Calculates desired child arrange size.
protected Size CalculateChildArrangeSize(Size finalSize)
Parameters
finalSize
Size
Returns
CalculateExtent(Size)
Calculates the extent that would be needed to show all items.
protected override Size CalculateExtent(Size availableSize)
Parameters
availableSize
Size
Returns
CalculateSpacing(Size, out double, out double)
Calculates desired spacing between items.
protected void CalculateSpacing(Size finalSize, out double innerSpacing, out double outerSpacing)
Parameters
CreateRect(double, double, double, double)
Defines panel coordinates and size.
protected Rect CreateRect(double x, double y, double width, double height)
Parameters
Returns
CreateSize(double, double)
Defines panel size.
protected Size CreateSize(double width, double height)
Parameters
Returns
GetHeight(Size)
Gets panel height.
protected double GetHeight(Size size)
Parameters
size
Size
Returns
GetLineDownScrollAmount()
Gets line down scroll amount.
protected override double GetLineDownScrollAmount()
Returns
GetLineLeftScrollAmount()
Gets line left scroll amount.
protected override double GetLineLeftScrollAmount()
Returns
GetLineRightScrollAmount()
Gets line right scroll amount.
protected override double GetLineRightScrollAmount()
Returns
GetLineUpScrollAmount()
Gets line up scroll amount.
protected override double GetLineUpScrollAmount()
Returns
GetMouseWheelDownScrollAmount()
Gets mouse wheel down scroll amount.
protected override double GetMouseWheelDownScrollAmount()
Returns
GetMouseWheelLeftScrollAmount()
Gets mouse wheel left scroll amount.
protected override double GetMouseWheelLeftScrollAmount()
Returns
GetMouseWheelRightScrollAmount()
Gets mouse wheel right scroll amount.
protected override double GetMouseWheelRightScrollAmount()
Returns
GetMouseWheelUpScrollAmount()
Gets mouse wheel up scroll amount.
protected override double GetMouseWheelUpScrollAmount()
Returns
GetPageDownScrollAmount()
Gets page down scroll amount.
protected override double GetPageDownScrollAmount()
Returns
GetPageLeftScrollAmount()
Gets page left scroll amount.
protected override double GetPageLeftScrollAmount()
Returns
GetPageRightScrollAmount()
Gets page right scroll amount.
protected override double GetPageRightScrollAmount()
Returns
GetPageUpScrollAmount()
Gets page up scroll amount.
protected override double GetPageUpScrollAmount()
Returns
GetWidth(Size)
Gets panel width.
protected double GetWidth(Size size)
Parameters
size
Size
Returns
GetX(Point)
Gets X panel orientation.
protected double GetX(Point point)
Parameters
point
Point
Returns
GetY(Point)
Gets Y panel orientation.
protected double GetY(Point point)
Parameters
point
Point
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.
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()