RowPanel Class
Represents a panel that can display several horizontal variants of rows of child controls.
public class RowPanel : Panel, IVariantControl
- Inheritance:
- object Visual UIElement FrameworkElement Panel object
- Implements:
- IVariantControl
Remarks
For detailed documentation on this control's features and how to use them, please see the RowPanel documentation topic.
Constructors
RowPanel()
Initializes an instance of the class.
public RowPanel()
Properties
Context
Gets or sets a ControlContext that describes the current context of the control.
public ControlContext Context { get; set; }
Property Value
- ControlContext:
A ControlContext that describes the current context of the control. The default value is
ControlContext.RibbonTabGroupItem
.
ItemSpacing
Gets the amount of horizontal spacing to place in between each child control of the panel.
public double ItemSpacing { get; set; }
Property Value
- double:
The amount of horizontal spacing to place in between each child control of the panel.
ItemVariantSize
Gets a VariantSize that specifies the variant size of contained controls based on the panel's current VariantSize.
public VariantSize ItemVariantSize { get; }
Property Value
- VariantSize:
A VariantSize that specifies the variant size of contained controls based on the panel's current VariantSize.
RowCount
Gets a RowPanelRowCount that specifies the number of rows based on the panel's current VariantSize.
public RowPanelRowCount RowCount { get; }
Property Value
- RowPanelRowCount:
A RowPanelRowCount that specifies the number of rows based on the panel's current VariantSize.
ThreeRowItemSortOrder
Gets or sets a Int32Collection that specifies the sort order of the child controls within the panel, when the panel is using a three-row variant.
public Int32Collection ThreeRowItemSortOrder { get; set; }
Property Value
- Int32Collection:
A Int32Collection that specifies the sort order of the child controls within the panel, when the panel is using a three-row variant.
ThreeRowVariantSize
Gets or sets the VariantSize of this panel that triggers a switch to three row layout mode.
public VariantSize ThreeRowVariantSize { get; set; }
Property Value
- VariantSize:
The VariantSize of this panel that triggers a switch to three row layout mode. The default value is
VariantSize.Medium
.
VariantSize
Gets or sets a VariantSize that indicates the control's current variant size.
public VariantSize VariantSize { get; set; }
Property Value
- VariantSize:
A VariantSize that indicates the control's current variant size. The default value is
VariantSize.Large
.
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)
Parameter | Type | Description |
---|---|---|
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.
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)
Parameter | Type | Description |
---|---|---|
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.
OnCreateAutomationPeer()
Creates and returns an AutomationPeer object for this type.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The AutomationPeer that was created.
OnVisualChildrenChanged(DependencyObject, DependencyObject)
Called when the VisualCollection of the visual object is modified.
protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved)
Parameter | Type | Description |
---|---|---|
visualAdded | DependencyObject | The Visual that was removed from the collection. |
visualRemoved | DependencyObject | The Visual that was removed from the collection. |
Fields
ContextProperty
Identifies the Context dependency property. This field is read-only.
public static readonly DependencyProperty ContextProperty
ItemSpacingProperty
Identifies the ItemSpacing dependency property. This field is read-only.
public static readonly DependencyProperty ItemSpacingProperty
RowCountProperty
Identifies the RowCount dependency property. This field is read-only.
public static readonly DependencyProperty RowCountProperty
ThreeRowItemSortOrderProperty
Identifies the ThreeRowItemSortOrder dependency property. This field is read-only.
public static readonly DependencyProperty ThreeRowItemSortOrderProperty
ThreeRowVariantSizeProperty
Identifies the ThreeRowVariantSize dependency property. This field is read-only.
public static readonly DependencyProperty ThreeRowVariantSizeProperty
VariantSizeProperty
Identifies the VariantSize dependency property. This field is read-only.
public static readonly DependencyProperty VariantSizeProperty