Interface IViewBuilder
Builds a view in C#. The result is the same screen a view file gives.
public interface IViewBuilder : ITemplateReferenceBuilder<IViewBuilder>
- Inherited Members
Methods
AddDecoration(Action<IDecorationBuilder>)
Adds a Decoration: a visual mark pinned to the view's edge, drawn outside the layout.
IViewBuilder AddDecoration(Action<IDecorationBuilder> configure)
Parameters
configureAction<IDecorationBuilder>
Returns
PopulateFromFile(string)
Takes the view from a file. False when the file could not be read as a view; the reasons are then what building the view reports, unless another file is populated in its place, which is how a caller falls back from one file to another.
bool PopulateFromFile(string fileName)
Parameters
fileNamestring
Returns
PopulateFromUntrustedText(string, string, UntrustedViewLimits)
Takes the view from markup the game did not ship -- a server's, downloaded and never written
to disk -- and holds it to what such a view may do: no resources or template references of
its own, no texture files, a font only by a plain name, and no larger than
limits (Default when null). False when it
is refused or cannot be read; building it then reports why.
bool PopulateFromUntrustedText(string markup, string name, UntrustedViewLimits limits = null)
Parameters
markupstringnamestringlimitsUntrustedViewLimits
Returns
RootDockLayout(Action<IDockLayoutBuilder>)
Sets the view's root to a dock layout, configured by configure.
IViewBuilder RootDockLayout(Action<IDockLayoutBuilder> configure)
Parameters
configureAction<IDockLayoutBuilder>
Returns
RootGridLayout(Action<IGridLayoutBuilder>)
Sets the view's root to a grid layout, configured by configure.
IViewBuilder RootGridLayout(Action<IGridLayoutBuilder> configure)
Parameters
configureAction<IGridLayoutBuilder>
Returns
RootStackLayout(Action<IStackLayoutBuilder>)
Sets the view's root to a stack layout, configured by configure.
IViewBuilder RootStackLayout(Action<IStackLayoutBuilder> configure)
Parameters
configureAction<IStackLayoutBuilder>
Returns
WithResources(Action<ITemplateBuilder>)
Declares the view's resources: colors, strings, gradients, styles and textures.
IViewBuilder WithResources(Action<ITemplateBuilder> configure)
Parameters
configureAction<ITemplateBuilder>
Returns
WithScope(ViewScope)
What the view resolves its images' Source and its {Localize} keys against
besides the game's own (ViewScope).
IViewBuilder WithScope(ViewScope scope)
Parameters
scopeViewScope