Color legend plain property method
The styles of a style dictionary, read by LoadStyles from a markup whose root is <Styles>: the ones with a key, which markups name (Style="danger", TextStyle="{Style title}") once the dictionary is added to their context with AddStyles, and the ones without, a general style for every element of their type once applied with ApplyGeneralStyles.
A sealed class of the BorrowedTorch.UI.Markup package (namespace BorrowedTorch.UI.Markup). The markup page shows it in context.
Names are colored by what they are: a property, a method or an event; values and fields keep the plain color.
Properties
General 🠆
IReadOnlyDictionary<Type, BaseStyle> · Read-only. The styles without a key, by their style types, one each.
Keyed 🠆
IReadOnlyDictionary<string, BaseStyle> · Read-only. The styles with a key, by their keys.
Methods
ApplyGeneralStyles() 🠆
ApplyGeneralStyles() · Makes each style without a key the general style of its type (Button.GeneralStyle for a ButtonStyle), which every element of the type takes under its own values. Returns an IDisposable: disposing it puts back the general styles there were before, where they are still the dictionary’s (a general style set since stays).
Get() 🠆
Get<T>(string key) · The style with the key, as its type T (a BaseStyle). Changing it reaches every element naming it. A key that isn’t there throws a KeyNotFoundException, a style of another type an InvalidCastException.
| Parameter | Type | Description |
|---|---|---|
key |
string |
The style’s Key in the dictionary. |