public SettingsViewModel() { m_OldSettings = Settings.Current.Copy(); LoadProperties(m_OldSettings); CloseDialog = ReactiveCommand.Create(() => Unit.Default); Ok = ReactiveCommand.Create(() => { var settings = EmitSettings(); Settings.Current = settings; }); Ok.InvokeCommand(CloseDialog); Apply = ReactiveCommand.Create(() => { var settings = EmitSettings(); Settings.Current = settings; }); Cancel = ReactiveCommand.Create(() => { Settings.Current = m_OldSettings; }); Cancel.InvokeCommand(CloseDialog); }