Beispiel #1
0
        /// <summary>
        /// 创建视图一,并显示
        /// </summary>
        private void CreateFirstView(object obj)
        {
            var model = new FirstViewModel();

            WorkspaceMulti.Add(model);
            ShowCurrentView(model);
        }
Beispiel #2
0
        /// <summary>
        /// 显示视图一
        /// </summary>
        private void ShowFirstView(object obj)
        {
            if (_workspaceStory == null)
            {
                _workspaceStory = new ObservableCollection <WorkspaceViewModel>();
            }

            var model =
                this._workspaceStory.FirstOrDefault(vm => vm is FirstViewModel)
                as FirstViewModel;

            if (model == null)
            {
                model = new FirstViewModel();
                _workspaceStory.Add(model);
            }

            WorkspaceSingle = model;
        }