public SettingsView CreateAndBindSettingsViewModel(object creationContext = null) { //Create View And ViewModel With Factories var viewModel = _viewModelFactory.CreateSettingsViewModel(); var view = _viewFactory.CreateSettingsView(); //Bind ViewModel To It's View Caliburn.Micro.ViewModelBinder.Bind(viewModel, view, creationContext); return(view); }
public bool Show() { var config = ClientServiceLocator.GetService <IUserConfiguration>(); var state = config.LoadConfiguration(); using (var view = factory.CreateSettingsView()) { view.SetState(state); if (view.ShowView()) { config.SaveConfigurate(state); return(true); } } return(false); }