public void SetActiveDocumentView(IDocumentView view) { UIDispatcher.Execute(() => { if (DocumentViews.Contains(view)) { ActiveDocumentView = view; } }); }
private void TabVm_Closed(object sender, EventArgs e) { var vm = sender as DocumentViewModel; if (vm != null && DocumentViews.Contains(vm.View as IDocumentView)) { _viewModels.Remove(vm.UniqueId); DocumentViews.Remove(vm.View as IDocumentView); OnCountChanged(); } }