public DeployWorksurfaceViewModel() : base(new EventAggregator()) { var mainViewModel = CustomContainer.Get <IShellViewModel>(); var dest = new DeployDestinationViewModel(mainViewModel, CustomContainer.Get <Microsoft.Practices.Prism.PubSubEvents.IEventAggregator>()); var stats = new DeployStatsViewerViewModel(dest); var source = new DeploySourceExplorerViewModel(mainViewModel, CustomContainer.Get <Microsoft.Practices.Prism.PubSubEvents.IEventAggregator>(), stats); dest.StatsArea = stats; var vm = new SingleExplorerDeployViewModel(dest, source, new List <IExplorerTreeItem>(), stats, mainViewModel, CustomContainer.Get <IPopupController>()); ViewModel = vm; View = new DeployView(); ViewModel.PropertyChanged += (sender, args) => { if (args.PropertyName == "Header") { OnPropertyChanged("DisplayName"); } ViewModelUtils.RaiseCanExecuteChanged(mainViewModel?.SaveCommand); }; }
public static void SetAttachedProperties(DeployView view, string tabName) { UIElementTabActionContext.SetTabActionContext(view, WorkSurfaceContext.DeployResources); UIElementTitleProperty.SetTitle(view, tabName); UIElementImageProperty.SetImage(view, "/images/database_save.png"); }