public SettingsViewModel(CandySettings settings) { _settings = settings; _phantom = _settings.Clone(); ApplicationInformationServiceUrl = _phantom.ToReactivePropertyAsSynchronized(x => x.ApplicationInformationServiceUrl) .SetValidateAttribute(() => ApplicationInformationServiceUrl); ApplicationRootDirectoryPath = _phantom.ToReactivePropertyAsSynchronized(x => x.ApplicationRootDirectoryPath); SetDefaultServiceCommand = ApplicationInformationServiceUrl.DistinctUntilChanged() .Select(x => x != CandySettings.DefaultApplicationInformationServiceUrl) .ToReactiveCommand(); SetDefaultServiceCommand.Subscribe(_ => SetDefaultService()); OkCommand = new ReactiveCommand(); OkCommand.Subscribe(_ => ApplySettings()); CancelCommand = new ReactiveCommand(); CancelCommand.Subscribe(_ => Cancel()); }