Esempio n. 1
0
        public static new void CreateEditor(ContentControl document)
        {
            RodskaApp app = (RodskaApp)RodskaApp.Current;

            document.Content = null;
            ITypeFactory typeFactory = app.currentMainVM.GetTypeFactory();
            MainWindow   mainWindow  = (MainWindow)app.MainWindow;

            if (mainWindow.CurrentDocument == null)
            {
                return;
            }
            ProgressionTree        tree      = (ProgressionTree)mainWindow.CurrentDocument;
            ProgressTreeViewModel  viewModel = typeFactory.CreateInstanceWithParametersAndAutoCompletion <ProgressTreeViewModel>(tree);
            ProgressionTreeControl control   = new ProgressionTreeControl(viewModel);

            document.Content = control;
        }
Esempio n. 2
0
 public ProgressionTreeControl(ProgressTreeViewModel viewModel) : base(viewModel)
 {
     InitializeComponent();
     navigation.SelectedItem = viewModel.Progression.RootNodeP.Children[0];
 }