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

            views.Remove(controlKind);
            if (views.Count == 0)
            {
                _windowViews.Remove(windowViewModel);
            }
        }
Beispiel #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;
        }