Getting Started
Hooking the view into MonoGame
The view will not show up until you mount it into the MonoGame host. The simplest way is to create a root panel in Game1, add your view to it, and pass that tree to UiRoot.
Minimal host setup
protected override void Initialize()
{
_root = new Panel();
_root.AddChild(new HelloWorldWithViewModelView());
_uiRoot = new UiRoot(_root)
{
UseRetainedRenderList = true,
UseDirtyRegionRendering = true,
UseConditionalDrawScheduling = true
};
base.Initialize();
}
If you want the smallest first step, start with the code-behind-only version. If you already know you want bindings and commands, start with the view model version and keep the view mostly declarative.