Class WrapPanel
WrapPanel is used to place child UIElements at sequential positions from left to the right and then "wrap" the lines of children from top to the bottom.
All children get the layout partition of size ItemWidth x ItemHeight.
Inheritance
Namespace: Syncfusion.UI.Xaml.Chat
Assembly: Syncfusion.Chat.WinUI.dll
Syntax
public class WrapPanel : Panel
Constructors
WrapPanel()
Declaration
public WrapPanel()
Fields
ItemHeightProperty
DependencyProperty for ItemHeight property.
Declaration
public static readonly DependencyProperty ItemHeightProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
ItemWidthProperty
DependencyProperty for ItemWidth property.
Declaration
public static readonly DependencyProperty ItemWidthProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
OrientationProperty
DependencyProperty for Orientation property.
Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
ItemHeight
The ItemWidth and ItemHeight properties specify the size of all items in the WrapPanel. Note that children of WrapPanel may have their own Width/Height properties set - the ItemWidth/ItemHeight specifies the size of "layout partition" reserved by WrapPanel for the child. If this property is not set (or set to "Auto" in markup or Double.NaN in code) - the size of layout partition is equal to DesiredSize of the child element.
Declaration
public double ItemHeight { get; set; }
Property Value
Type |
---|
System.Double |
ItemWidth
The ItemWidth and ItemHeight properties specify the size of all items in the WrapPanel. Note that children of WrapPanel may have their own Width/Height properties set - the ItemWidth/ItemHeight specifies the size of "layout partition" reserved by WrapPanel for the child. If this property is not set (or set to "Auto" in markup or Double.NaN in code) - the size of layout partition is equal to DesiredSize of the child element.
Declaration
public double ItemWidth { get; set; }
Property Value
Type |
---|
System.Double |
Orientation
Specifies dimension of children positioning in absence of wrapping. Wrapping occurs in orthogonal direction. For example, if Orientation is Horizontal, the items try to form horizontal rows first and if needed are wrapped and form vertical stack of rows. If Orientation is Vertical, items first positioned in a vertical column, and if there is not enough space - wrapping creates additional columns in horizontal dimension.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type |
---|
Microsoft.UI.Xaml.Controls.Orientation |
Methods
ArrangeOverride(Size)
Microsoft.UI.Xaml.FrameworkElement.ArrangeOverride(Windows.Foundation.Size)
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | finalSize |
Returns
Type |
---|
Windows.Foundation.Size |
MeasureOverride(Size)
Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Windows.Foundation.Size)
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | constraint |
Returns
Type |
---|
Windows.Foundation.Size |