diff options
author | Eric Maupin <ermaup@microsoft.com> | 2018-08-20 21:47:32 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2018-10-17 22:12:52 +0300 |
commit | 048813758e59ad62dc2886e9f0c71eeeb8db0aaf (patch) | |
tree | 72138a9588d60edf7e10601c34e9fd573d5ea456 | |
parent | b7519cdec7b3f7ecfcdd388777c81fc257085350 (diff) |
[Core] Bindings should be set via SourceDescriptor
-rw-r--r-- | Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs | 7 | ||||
-rw-r--r-- | Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs b/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs index f606c75..f1a0d51 100644 --- a/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs +++ b/Xamarin.PropertyEditing.Tests/PropertyViewModelTests.cs @@ -1426,10 +1426,9 @@ namespace Xamarin.PropertyEditing.Tests Assert.That (requested, Is.True, "Binding wasn't requested"); Assert.That (vm.ValueSource, Is.EqualTo (ValueSource.Binding)); - editor.Verify (oe => oe.SetValueAsync (mockProperty.Object, new ValueInfo<TValue> { - Source = ValueSource.Binding, - SourceDescriptor = bindObject - }, It.IsAny<PropertyVariation> ())); + editor.Verify (oe => oe.SetValueAsync (mockProperty.Object, It.Is<ValueInfo<TValue>> (vi => + vi.Source == ValueSource.Binding && vi.SourceDescriptor == bindObject + ), It.IsAny<PropertyVariation> ())); } protected TViewModel GetViewModel (IPropertyInfo property, IObjectEditor editor) diff --git a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs index 6806ad6..bcf1c09 100644 --- a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs @@ -458,7 +458,7 @@ namespace Xamarin.PropertyEditing.ViewModels await SetValueAsync (new ValueInfo<TValue> { Source = ValueSource.Binding, - ValueDescriptor = e.BindingObject + SourceDescriptor = e.BindingObject }); } |