Color legend plain property dependency property method
Shows its items in a view of its own size and scrolls them when they are larger, with scroll bars, the mouse wheel or code.
ScrollableContainer 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
ContentMargin 🠆
Margin · Read-only. The current offset of the content in the view: Left and Top are 0 or negative while it is scrolled.
GeneralMouseCursorsSet 🠆
MouseCursorsSet · Static. The cursors of every element of this style type; null (the default) falls back to DefaultMouseCursorsSet.
GeneralStyle 🠆
ScrollableContainerStyle · 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.
HorizontalScrollingValue 🠆
float · How far the content is scrolled sideways, from 0 (the left) to 1 (the right).
Items 🠆
IReadOnlyList<BaseElement> · Read-only. The items that scroll: the elements you added. The container’s Children are its view and scroll bars. A live view.
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.
ScrollAreaHeight 🠆
float · Read-only. How far the content can scroll down, in units: its height less the view’s height (0 or less while it fits).
ScrollAreaWidth 🠆
float · Read-only. How far the content can scroll sideways, in units: its width less the view’s width (0 or less while it fits).
ScrollBars 🠆
ScrollBars · Which scroll bars may show: None, Vertical, Horizontal or Both (the default). A bar shows only while the content needs it.
ScrollBarsStyle 🠆
SliderStyle · The style of the scroll bars (see sliders). The vertical bar gets a copy with the colors of its two line halves swapped. Unless set, a light gray track on both sides of a gray thumb, as a scroll bar has, in the DefaultScrollBars colors of DefaultSettings.
ScrollBarsThickness 🠆
int · The width of a vertical bar and the height of a horizontal one, in units. The default is 12 (DefaultSettings.DefaultScrollBarsThickness).
StyleOverride 🠆
ScrollableContainerStyle · A style for this element only, applied over the general style. Setting it to null takes its values back out.
VerticalScrollingValue 🠆
float · How far the content is scrolled down, from 0 (the top) to 1 (the bottom).
Methods
ScrollableContainer() 🠆
ScrollableContainer(string name = null) · Creates a scrollable container. 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 to the view.
| Parameter | Type | Description |
|---|---|---|
item |
BaseElement |
The element to add. |
AddItemAt() 🠆
AddItemAt(BaseElement item, int index) · Inserts the item at the index.
| 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. |
AddItemsRange() 🠆
AddItemsRange(IEnumerable<BaseElement> items) · Adds the items at the end.
| Parameter | Type | Description |
|---|---|---|
items |
IEnumerable<BaseElement> |
The elements to add, in order. |
AddItemsRangeAt() 🠆
AddItemsRangeAt(IEnumerable<BaseElement> items, int index) · Inserts the items from the index on.
| Parameter | Type | Description |
|---|---|---|
items |
IEnumerable<BaseElement> |
The elements to insert, in order. |
index |
int |
The position of the first one: 0 for the first, the number of items for the end. |
ClearItems() 🠆
ClearItems() · Removes every item.
HorizontalPageDecrease() 🠆
HorizontalPageDecrease() · Obsolete: use PageRight and PageLeft.
HorizontalPageIncrease() 🠆
HorizontalPageIncrease() · Obsolete: use PageRight and PageLeft.
PageDown() 🠆
PageDown() · Scrolls down by one view height. Does nothing while the content fits.
PageLeft() 🠆
PageLeft() · Scrolls left by one view width. Does nothing while the content fits.
PageRight() 🠆
PageRight() · Scrolls right by one view width. Does nothing while the content fits.
PageUp() 🠆
PageUp() · Scrolls up by one view height. Does nothing while the content fits.
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.
| Parameter | Type | Description |
|---|---|---|
index |
int |
The index of the item to take out. |
RemoveItemsRangeAt() 🠆
RemoveItemsRangeAt(int index, int count) · Removes count items from the index on.
| Parameter | Type | Description |
|---|---|---|
index |
int |
The index of the first item to take out. |
count |
int |
The number of items to take out. |
VerticalPageDecrease() 🠆
VerticalPageDecrease() · Obsolete: use PageUp and PageDown. The old names followed the vertical scroll bar’s value, which grows upwards, so “increase” scrolled up.
VerticalPageIncrease() 🠆
VerticalPageIncrease() · Obsolete: use PageUp and PageDown. The old names followed the vertical scroll bar’s value, which grows upwards, so “increase” scrolled up.