A top-level working space. This is the user's "Unit of Work".
상속: Zetbox.Client.Presentables.ViewModel
예제 #1
0
        private void RemoveWindowViewModel(WindowViewModel windowViewModel, ControlKind controlKind)
        {
            var views = _windowViews[windowViewModel];

            views.Remove(controlKind);
            if (views.Count == 0)
            {
                _windowViews.Remove(windowViewModel);
            }
        }
예제 #2
0
        private void InstallRemovalHandler(WindowViewModel windowViewModel, ControlKind controlKind)
        {
            PropertyChangedEventHandler handler = null;

            handler = (object sender, PropertyChangedEventArgs e) =>
            {
                if (e.PropertyName == "Show" && !windowViewModel.Show)
                {
                    RemoveWindowViewModel(windowViewModel, controlKind);
                    windowViewModel.PropertyChanged -= handler;
                }
            };

            windowViewModel.PropertyChanged += handler;
        }