diff options
Diffstat (limited to 'Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs')
-rw-r--r-- | Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs index 63e9798..2e8a3ac 100644 --- a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs @@ -152,10 +152,8 @@ namespace Xamarin.PropertyEditing.ViewModels } } - MultipleValues = disagree; - // The public setter for Value is a local set for binding - SetCurrentValue (currentValue); + SetCurrentValue (currentValue, disagree); } } @@ -217,11 +215,13 @@ namespace Xamarin.PropertyEditing.ViewModels OnPropertyChanged (nameof (Resource)); } - private bool SetCurrentValue (ValueInfo<TValue> newValue) + private bool SetCurrentValue (ValueInfo<TValue> newValue, bool multipleValues) { - if (!this.isNullable && newValue != null && newValue.Value == null) + if (!this.isNullable && !multipleValues && newValue != null && newValue.Value == null) newValue.Value = DefaultValue; + MultipleValues = multipleValues; + if (this.value == newValue) return false; |