Class DockPanel
Arranges child elements around the edges of the panel. Optionally, last added child element can occupy the remaining space.
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Toolkit.dll
Syntax
public class DockPanel : Panel, IFrameworkElement, IUIElement, IDependencyObject
Constructors
| Improve this Doc View SourceDockPanel()
Initializes a new instance of the DockPanel class.
Declaration
public DockPanel()
Fields
| Improve this Doc View SourceDockProperty
Identifies the Dock attached property.
Declaration
public static readonly DependencyProperty DockProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
LastChildFillProperty
Identifies the LastChildFill dependency property.
Declaration
public static readonly DependencyProperty LastChildFillProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceLastChildFill
Gets or sets a value indicating whether the last child element added to a DockPanel resizes to fill the remaining space.
Declaration
public bool LastChildFill { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the last element added resizes to fill the remaining space, false to indicate the last element does not resize. The default is true. |
Methods
| Improve this Doc View SourceArrangeOverride(Size)
Arranges the child elements of the DockPanel control.
Declaration
protected override Size ArrangeOverride(Size arrangeSize)
Parameters
Type | Name | Description |
---|---|---|
Size | arrangeSize | The area in the parent element that the DockPanel should use to arrange its child elements. |
Returns
Type | Description |
---|---|
Size | The actual size of the DockPanel after the child
elements are arranged. The actual size should always equal
|
Overrides
| Improve this Doc View SourceGetDock(UIElement)
Gets the value of the Dock attached property for the specified element.
Declaration
public static Dock GetDock(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element from which the property value is read. |
Returns
Type | Description |
---|---|
Dock | The Dock property value for the element. |
MeasureOverride(Size)
Measures the child elements of a DockPanel in preparation for arranging them during the ArrangeOverride(Size) pass.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
Size | constraint | The area available to the DockPanel. |
Returns
Type | Description |
---|---|
Size | The desired size of the DockPanel. |
Overrides
| Improve this Doc View SourceSetDock(UIElement, Dock)
Sets the value of the Dock attached property for the specified element to the specified dock value.
Declaration
public static void SetDock(UIElement element, Dock dock)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element to which the attached property is assigned. |
Dock | dock | The dock value to assign to the specified element. |