private void BindProject(Project newProject) { if (newProject != null) { ProjectView.BindToProject(newProject); #region title binding MultiBinding titleBinding = new MultiBinding(); titleBinding.Mode = BindingMode.OneWay; titleBinding.Converter = new MainWindowTitleConverter(); titleBinding.Bindings.Add(new Binding("Name") { Mode = BindingMode.OneWay, Source = newProject }); titleBinding.Bindings.Add(new Binding("HasUnsavedChanges") { Mode = BindingMode.OneWay, Source = newProject }); this.SetBinding(TitleProperty, titleBinding); #endregion if (newProject.ProjectFile != null) { ConfigurationManager.Configuration.AddToRecentFiles(newProject.ProjectFile); } } }
private void BindProject(Project newProject) { if (newProject != null) { ProjectView.BindToProject(newProject); #region title binding //Binding titleBinding = new Binding(); //titleBinding.Mode = BindingMode.OneWay; //titleBinding.Converter = new MainWindowTitleConverter(); //titleBinding.Source = newProject; //this.SetBinding(TitleProperty, titleBinding); #endregion if (newProject.ProjectFile != null) { //ConfigurationManager.Configuration.AddToRecentFiles(newProject.ProjectFile); } } }