Пример #1
0
        public EditorWindow()
        {
            InitializeComponent();

            var tableControllerViewModel = new TableControllerViewModel();
            var viewModel = new EditorWindowViewModel(tableControllerViewModel);

            DataContext = viewModel;
            viewModel.PropertyChanged += (s, e) =>
            {
                var x = s as EditorWindowViewModel;
                if (x == null)
                {
                    return;
                }
                if (e.PropertyName == "Project")
                {
                    tableControllerViewModel.Project = viewModel.Project;
                }
            };
            TablesController.DataContext = tableControllerViewModel;
        }
Пример #2
0
 public EditorWindowViewModel(TableControllerViewModel tableControllerViewModel)
 {
     _tableController             = tableControllerViewModel;
     _tableController.UpdateViews = UpdateAll;
     PropertyChanged += OnPropertyChanged;
 }