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
ExpandedItemTemplateProperty
public static readonly DependencyProperty ExpandedItemTemplateProperty
Field Value
ItemSizeProperty
public static readonly DependencyProperty ItemSizeProperty
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
ExpandedItem
Gets or set the expanded item. The default value is null.
public object? ExpandedItem { get; set; }
Property Value
ExpandedItemTemplate
Gets or sets the data template used for the item expansion.
public DataTemplate? ExpandedItemTemplate { 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
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
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.
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.
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
objectThe object that raised the event.
args
ItemsChangedEventArgsProvides data for the ItemsChanged event.