Skip to content

Getting Started

Mark Kromis edited this page Oct 19, 2019 · 1 revision

Getting started

If you are creating a new WPF application, follow these steps:

  • Create a core project MvvmCross TipCalc.Core

  • Create a wpf project MvvmCross TipCalc.WPF

  • For the wpf project add the MinoriShell nuget package.

  • Update the setup type in App.xmal.cs to use MisWpfSetup.

    • Note: Some Objects are prefixed with Mes (Minori Editor Shell)
  • Most of the library is setup in the MvvmCross style for various platforms. For wpf items they are in Platforms\Wpf\Views etc.

 protected override void RegisterSetup() => this.RegisterSetupType<MesWpfSetup<Core.App>>();
  • Create a MainView object that inherits from MvxWpfView. See SimpleDemo from source for an example.

By far the easiest way to get started with MinoriEditorShell is to use the various NuGet packages. First, install the base MinoriEditorShell package:

Then add any other modules you are interested in (note that some modules have dependencies on other modules, but this is taken care of by the NuGet package dependency system):

Documents

Documents are (usually) displayed in the main area in the middle of the window. To create a new document type, simply inherit from the MesDocument class:

public class SceneViewModel : MesDocument
{
	public override string DisplayName => "3D Scene";

	private Vector3 _position;
	public Vector3 Position
	{
            get => _position;
            set => SetProperty(ref _position, value)
	}
}

To open a document, navigate to it MvvmCross style. The is dependent that the MesSetup class is initialized.

NavigationService.Navigate<[IMesDocument/IMesTool]>();
Clone this wiki locally