Docs / UI

Glossary: StackPanel Style

The properties, methods and events of StackPanel, in alphabetical order.

Color legend plain property dependency property method

Puts its items one after another, in a column or in a row, and fits their size.

StackPanel derives from BaseElement and has its members too. The layout page shows it in context, with code and screenshots.

Names are colored by what they are: a plain property, a method, an event or a dependency property, which a style, a binding or an animation can set.

Properties

GeneralMouseCursorsSet 🠆

MouseCursorsSet · Static. The cursors of every element of this style type; null (the default) falls back to DefaultMouseCursorsSet.

GeneralStyle 🠆

StackPanelStyle · Static. The style of every element of this style type. It starts as a copy of the framework defaults; changing one of its properties updates every such element, a property it leaves unset takes its default.

Items 🠆

IReadOnlyList<BaseElement> · Read-only. The items in the order they are stacked: the elements you added, not the panel’s wrappers. A live view, nothing is copied.

MouseCursorsSet 🠆

MouseCursorsSet · Read-only. The cursors the element shows: its override, else the set given to the control it is a part of, else its type’s general set, else DefaultMouseCursorsSet.

MouseCursorsSetOverride 🠆

MouseCursorsSet · The cursors of this element only, passed on to its parts that have none of their own.

Orientation 🠆

Orientation · Vertical stacks the items top to bottom, Horizontal left to right. The default is Horizontal.

StyleOverride 🠆

StackPanelStyle · A style for this element only, applied over the general style. Setting it to null takes its values back out.

Methods

StackPanel() 🠆

StackPanel(string name = null) · Creates a stack panel. The name is used by GetElementByName.

Parameter Type Description
name string The element’s Name, which GetElementByName finds it by. Default: null.

AddItem() 🠆

AddItem(BaseElement item) · Adds the item at the end. A null item is ignored.

Parameter Type Description
item BaseElement The element to add.

AddItemAt() 🠆

AddItemAt(BaseElement item, int index) · Inserts the item at the index (0 to the item count).

Parameter Type Description
item BaseElement The element to insert.
index int The position to insert it at: 0 for the first, the number of items for the end.

ClearItems() 🠆

ClearItems() · Removes every item. The items are detached, not disposed.

RemoveItem() 🠆

RemoveItem(BaseElement item) · Removes the item. It is detached, not disposed.

Parameter Type Description
item BaseElement The element to take out.

RemoveItemAt() 🠆

RemoveItemAt(int index) · Removes the item at the index. It is detached, not disposed.

Parameter Type Description
index int The index of the item to take out.