Exemplo n.º 1
0
        private void InitializeProjectControl(ProjectControl prControl)
        {
            prControl.btnCreateProject.Click += new RoutedEventHandler(btnCreateProject_Click);
            prControl.btnOpenProject.Click += new RoutedEventHandler(btnOpenProject_Click);
            prControl.btnAddModel.Click += new RoutedEventHandler(btnAddModel_Click);

            prControl.DataContext = manager;
        }
Exemplo n.º 2
0
        private void InitializeNavigator()
        {
            var projectControl = new ProjectControl();
            InitializeProjectControl(projectControl);

            navigator = new VisualNavigator(projectControl);
            navigator.FocusChanged += (sender_, e_) =>
                {
                    var control = e_.Value;
                    string modelName = control is TreeControl ? (control as TreeControl).modelName : null;

                    if (!string.IsNullOrWhiteSpace(modelName)) manager.Project.CurrentModelName = modelName;
                };

            LayoutRoot.DataContext = navigator;
        }