Docs / UI

UI glossary: types

Every other type the UI provides: classes, structs, interfaces, enums and delegates, one page per type.

Color legend plain property dependency property method event

Every public type of the UI that isn’t an element has a page with its members: the values of an enum, the properties, fields, methods and events of a class or a struct, the signature of a delegate. The styles come first, then every other type by kind, then the types of the markup package.

Styles

Style What it is
BaseStyle The abstract base of every style class.
BorderStyle The style class of Border: the properties a style can set on it.
ButtonStyle The style class of Button: the properties a style can set on it.
CheckBoxStyle The style class of CheckBox: the properties a style can set on it.
ColorPickerStyle The style class of ColorPicker: the properties a style can set on it.
ComboBoxStyle The style class of ComboBox: the properties a style can set on it.
ContextMenuStyle The style class of ContextMenu: the properties a style can set on it.
DefaultWindowTitleBarStyle  
ImageStyle The style class of Image: the properties a style can set on it.
LabelStyle The style class of Label: the properties a style can set on it.
ListBoxStyle The style class of ListBox: the properties a style can set on it.
ProgressBarStyle The style class of ProgressBar: the properties a style can set on it.
RichTextBoxStyle The style class of RichTextBox: the properties a style can set on it.
RootElementStyle The style class of RootElement: the properties a style can set on it.
ScrollableContainerStyle The style class of ScrollableContainer: the properties a style can set on it.
SliderStyle The style class of Slider: the properties a style can set on it.
StackPanelStyle The style class of StackPanel: the properties a style can set on it.
StencilStyle The style class of Stencil: the properties a style can set on it.
ToolTipStyle The style class of ToolTip: the properties a style can set on it.
TreeViewStyle The style class of TreeView: the properties a style can set on it.
ViewPortStyle The style class of ViewPort: the properties a style can set on it.
WindowStyle The style class of Window: the properties a style can set on it.

Others

Classes

Type What it is
Animation<T> An animation of properties of type T.
BaseAnimation The abstract base of animations, the type AddAnimation takes.
BaseAnimationFrame<T> The abstract base of the frames an Animation<T> takes.
Bindable The abstract base of a view model.
BindableCollection<T> A list that raises OnCollectionChanged for every change, so a bound ListBox, ComboBox, TreeView or ContextMenu updates only the changed rows.
BorrowedTorchUI The UI itself: it holds the root element, updates and draws the tree, and tells the game whether it has the mouse and the keys.
DefaultSettings DefaultSettings (namespace BorrowedTorch.UI.Settings) is a static class of public fields that hold framework-wide defaults.
DependencyProperty<T>  
DependencyPropertyActions<T> What the properties of one name share over all the elements of a class: the class’s own pre- and post-action (set once, in its static constructor) and the default value.
DiscreteAnimationFrame<T> Sets Value when the time line reaches ApplyAtMs.
DisplayScale Reads the Windows display scale of the monitor a window is on.
DisposableBase The base class of BaseElement, with the dispose pattern every element uses.
DragAndDropCursors The cursors of drag and drop.
ElementStateData The state an element shows, passed to OnStateChanged.
GameWindowTextInputEvents An ITextInputEvents that forwards a MonoGame window’s events.
GenericMouseCursorsData<T> The static holder of the general mouse cursors set of one element type, keyed by its style class T.
GenericStyle<T> The static holder of the general style of one style type, where T is the style class.
GenericStyleAndMouseCursorsData<TStyle> TStyle is a style class (deriving from BaseStyle, with a parameterless constructor).
KeyDownEventArgs  
MouseClickEventArgs What OnClick and OnDoubleClick get, taken when the click happens.
MouseCursorsSet The cursors an element shows.
ResizeCursors The cursors of the eight grips around a resizable element.
RichTextCursors The cursors over the text of a RichTextBox.
RunBoundaryValues<T> Values set on the animated properties outside the frames: StartValue when the animation first starts, EndValue when it completes.
SmoothAnimationFrame<T> Goes from From to To between StartAtMs and StartAtMs + DurationMs of the time line, and goes back the same way when the time line reverses.
SourceData The value of Image.Source: a wrapper around a texture that you rarely write yourself, since a Texture2D or a content path converts to it.
TabControl Not an element but a helper: it pairs tab elements with content elements and shows only the content of the open tab.

Structs

Type What it is
Margin A small read-only struct with one value per side.

Interfaces

Type What it is
IBindableCollection An IEnumerable that reports its changes.
IConverter Translates between the source’s type and the property’s type.
IItemsTemplate A list’s ItemsTemplate.
ITextInputEvents The source of typed text and key presses, for a UI hosted outside a game window.

Enums

Type What it is
AnimationRepeatType  
AnimationState  
BindingMode  
ButtonType  
CheckBoxDirection  
CheckBoxType  
CollectionChangeType Passed to OnSourceCollectionChanged.
ContextMenuPlacement  
ContextMenuSubMenusOpenType  
DragType  
ElementState From the lowest to the highest.
HorizontalAlignment  
ImageFill  
InheritState A set of flags: the values combine.
ListBoxSelectionMode  
ListBoxVirtualizationMode  
Orientation Used by StackPanel, Slider and ProgressBar, see layout and controls.
ResizeState  
RichTextBoxFormatting  
RichTextBoxInputType  
RichTextBoxType  
ScrollBars  
SliderType  
StateSource  
TextAlignment Also used by RichTextBox.
TextRotation  
TextWrap Also used by RichTextBox.
TickPlacement  
ToolTipPlacement  
ValueSources  
VerticalAlignment  
VerticalTextAlignment Also used by RichTextBox.
Visibility  

Delegates

Type What it is
BaseElement.Click  
BaseElement.Disposed  
BaseElement.DoubleClick  
BaseElement.DragAndDropStart  
BaseElement.Drop  
BaseElement.DropDenied  
BaseElement.IfDropAllowed  
BaseElement.KeyDown  
BaseElement.MouseEnter  
BaseElement.MouseLeave  
BaseElement.StateChanged  
Bindable.PropertyChanged  
Button.Toggled  
CheckBox.CheckedUnchecked  
ColorPicker.SelectedColorChanged  
ContextMenu.ItemSelect  
DependencyProperty<T>.OwnerPreActionDelegate  
DependencyProperty<T>.PreActionDelegate  
DependencyProperty<T>.PropertyChanged  
DependencyProperty<T>.SourceCollectionChanged  
DependencyProperty<T>.SourcePropertyChanged  
GenericMouseCursorsData<T>.MouseCursorsChanged  
GenericStyle<T>.StyleChanged  
IBindableCollection.CollectionChanged  
ListBox.ItemSelect  
ListBox.ItemsSelect  
RichTextBox.Apply  
RichTextBox.TextChanged  
Slider.ValueChanged  
TabControl.TabOpened  
TreeView.ItemSelect  

Markup

The types of the BorrowedTorch.UI.Markup package, which builds elements from XML markup.

Type What it is
MarkupAnimation An animation of a markup’s <Ui.Animations>: the element and property it animates, what starts and stops it, and its time line, to start, stop or seek from code.
MarkupContext What a markup reaches besides the UI’s own types: event handlers, a data context, style dictionaries, how its files are read, types and converters of your own, and whether its load animations start.
MarkupDocument What a markup made: its elements, every element made for them, disposed at once, its elements as written, and its animations.
MarkupException A markup that can’t be read: what is wrong, and the line and the column.
MarkupNode An element of a markup as it is written: the element made, its file, line and column, and the elements in it.
StyleDictionary The styles of a style dictionary: keyed ones for markups to name, and general ones to apply.
UiMarkup Builds elements from a markup string or file, reads style dictionaries, and reads single values as a markup does, for tools.