Class StackPanel
Arranges child elements into a single line that can be oriented horizontally or vertically.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public class StackPanel : Panel
Examples
You can add a StackPanel with a Horizontal orientation in the XAML as follows:
Or in C#:
StackPanel stackPanel = new StackPanel();
stackPanel.Orientation = Orientation.Horizontal;
Fields
| Improve this Doc View SourceOrientationProperty
Identifies the Orientation dependency property
Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceOrientation
Gets or sets the dimension by which child elements are stacked.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation |
Methods
| Improve this Doc View SourceArrangeOverride(Size)
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
Size | finalSize |
Returns
Type | Description |
---|---|
Size |
Overrides
| Improve this Doc View SourceCreateDomChildWrapper(Object, out Object, Int32)
Declaration
public override object CreateDomChildWrapper(object parentRef, out object domElementWhereToPlaceChild, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parentRef | |
System.Object | domElementWhereToPlaceChild | |
System.Int32 | index |
Returns
Type | Description |
---|---|
System.Object |
Overrides
| Improve this Doc View SourceCreateDomElement(Object, out Object)
Declaration
public override object CreateDomElement(object parentRef, out object domElementWhereToPlaceChildren)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parentRef | |
System.Object | domElementWhereToPlaceChildren |
Returns
Type | Description |
---|---|
System.Object |
Overrides
| Improve this Doc View SourceINTERNAL_OnDetachedFromVisualTree()
Declaration
protected override void INTERNAL_OnDetachedFromVisualTree()
Overrides
| Improve this Doc View SourceMeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize |
Returns
Type | Description |
---|---|
Size |