Namespace BSGameLib.UI
Classes
- CommandBase
The base of a command: a named action a control runs when it is used. Commands are ICommands; a view-model exposes one for a button to name in its
Commandattribute.
- CommandManager
Holds the commands registered with it and runs them on request. Nothing else reads the registrations.
- DelegateCommand
A command that runs an action when it is executed.
- EnumToBooleanConverter
Converts between an enum value and a bool, for a radio button or check box bound to one of the values. The converter parameter is the value the binding stands for.
- EventArgs
The base of the arguments for a UI event.
- KeyEventArgs
The arguments for a key event: which key, and which modifier keys were held.
- MouseEventArgs
The arguments for a mouse event on a control: where the pointer was, the mouse state and the keys held.
- ServiceExtensions
Extension methods that register the UI with a game's dependency injection container.
- View
A View represents a logical "page" of UI within a UIRoot. Contains layout + controls, manages focus within itself.
- ViewHover
What the pointer rests on: the
HoverKeyof a control, and the view it is in.
- ViewModel
The base of a view-model that builds its own view, in BuildView(IViewBuilder).
- ViewModelBase
The base of a view-model. It raises PropertyChanged when a property changes, so that the bindings in the view update.
- ViewScope
What one view resolves against besides the game's own: where its images' pictures come from, a prefix its
{Localize key}keys are looked up under first, and the game's templates it is built with. For a view from somewhere else -- a server's plugin -- whose words and pictures are its own and must meet neither the game's nor another's.
Structs
- CapturedKey
A key a player pressed while IKeyCapture was listening, with the modifiers held around it. A modifier pressed and let go on its own comes back as that key with no modifiers - Shift alone is a binding in its own right (running, say).
Interfaces
- ICancelableViewModel
A view model whose screen can be backed out of with Escape.
- ICommand
A command a control runs when it is used. Controls name one by the view-model property that holds it.
- ICommandManager
Holds commands and runs them.
- IDataContext
Something a view's bindings read values from and write values to. IViewModel is one; the design-time context is another.
- IDynamicDataContext
A data context whose bound values are looked up by name at runtime rather than reflected off CLR properties. BSGameLib.UI.Internal.BindingManager checks for this before falling back to reflection, so an implementor does not need a real property per binding.
Exists for design-time preview data (see DesignTimeDataContext), where instantiating the real view model is not possible - a view model's constructor routinely touches game singletons that only exist inside a running client.
- IFocusScope
A control holding interactive controls that a walk of the view's own tree cannot reach.
- IKeyCapture
Takes the next key the player presses instead of letting the UI act on it - for a "press a key" prompt when rebinding.
- IRootContext
The game objects a UI root works with: the game, its content and its window.
- IRootContextFactory
Creates the IRootContext a UI root is made with.
- ITextureModelLoader
Loads the textures that a view's XML declares, for the controls that use them.
- ITextureModelStore
Holds the texture declarations read from views, by id.
- IThemeManager
Holds which theme variant is active, and names the file a view's
<References Source="Theme.template.xml"/>should load under it.
- IThemeResourceStore
Holds the named values (
<Color>,<String>) declared by a view's<Resources>or by a shared template pulled in through<References>, so attributes elsewhere can refer to them as{Resource id}.
- IValueConverter
Converts a value between a view-model property and the control bound to it.
- IViewManager
Shows, replaces and removes the views on screen, and holds the UI's scale and button sound.
- IViewModel
A view-model: the data and commands that a view's bindings use.
- IViewModel<T>
A view-model for the view type
T.
- IViewPictures
What an image's
Sourcenames, answered by the game for one view: a picture by a name the game gives meaning to, such as a key into its own art, never a file.