diff options
author | Eric Maupin <ermaup@microsoft.com> | 2018-08-17 23:40:20 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2018-10-17 22:12:52 +0300 |
commit | b0d734b01989ee677b8bcc214cbcad0a96e1cd96 (patch) | |
tree | 78f4e63b1e0df645695414c9f5cb135910646a91 /Xamarin.PropertyEditing | |
parent | 97075e3ad4ece7596745e1f16257638ee0c55b30 (diff) |
[Core] Pass around Variant
Diffstat (limited to 'Xamarin.PropertyEditing')
15 files changed, 77 insertions, 73 deletions
diff --git a/Xamarin.PropertyEditing/ViewModels/BrushPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/BrushPropertyViewModel.cs index 792d35c..f3d5ff8 100644 --- a/Xamarin.PropertyEditing/ViewModels/BrushPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/BrushPropertyViewModel.cs @@ -12,9 +12,8 @@ namespace Xamarin.PropertyEditing.ViewModels { internal class BrushPropertyViewModel : PropertyViewModel<CommonBrush> { - public BrushPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, - IEnumerable<CommonBrushType> allowedBrushTypes = null) - : base (platform, property, editors) + public BrushPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null, IEnumerable<CommonBrushType> allowedBrushTypes = null) + : base (platform, property, editors, variant) { if (property.Type.IsAssignableFrom (typeof (CommonSolidBrush)) || property.Type.IsAssignableFrom (typeof (CommonColor))) { diff --git a/Xamarin.PropertyEditing/ViewModels/CollectionPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/CollectionPropertyViewModel.cs index 0803061..ca9db5f 100644 --- a/Xamarin.PropertyEditing/ViewModels/CollectionPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/CollectionPropertyViewModel.cs @@ -55,8 +55,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class CollectionPropertyViewModel : PropertyViewModel<IList> { - public CollectionPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public CollectionPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { if (this.cachedProvider == null) this.cachedProvider = new CachedEditorProvider (platform.EditorProvider); diff --git a/Xamarin.PropertyEditing/ViewModels/CombinablePropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/CombinablePropertyViewModel.cs index b84f0a5..41cf454 100644 --- a/Xamarin.PropertyEditing/ViewModels/CombinablePropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/CombinablePropertyViewModel.cs @@ -44,8 +44,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class CombinablePropertyViewModel<TValue> : PropertyViewModel<TValue> { - public CombinablePropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public CombinablePropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { this.predefinedValues = property as IHavePredefinedValues<TValue>; if (this.predefinedValues == null) @@ -80,7 +80,7 @@ namespace Xamarin.PropertyEditing.ViewModels using (await AsyncWork.RequestAsyncWork (this)) { var newValues = new Dictionary<string, bool?> (this.predefinedValues.PredefinedValues.Count); - ValueInfo<IReadOnlyList<TValue>>[] values = await Task.WhenAll (Editors.Select (ed => ed.GetValueAsync<IReadOnlyList<TValue>> (Property, Variations)).ToArray ()); + ValueInfo<IReadOnlyList<TValue>>[] values = await Task.WhenAll (Editors.Select (ed => ed.GetValueAsync<IReadOnlyList<TValue>> (Property, Variant)).ToArray ()); foreach (ValueInfo<IReadOnlyList<TValue>> valueInfo in values) { if (valueInfo == null || valueInfo.Value == null || valueInfo.Source == ValueSource.Unset) { foreach (var kvp in this.predefinedValues.PredefinedValues) { @@ -138,7 +138,7 @@ namespace Xamarin.PropertyEditing.ViewModels var currentChoices = Choices.ToDictionary (c => c, c => c.IsFlagged); foreach (IObjectEditor editor in Editors) { - ValueInfo<IReadOnlyList<TValue>> value = await editor.GetValueAsync<IReadOnlyList<TValue>> (Property, Variations); + ValueInfo<IReadOnlyList<TValue>> value = await editor.GetValueAsync<IReadOnlyList<TValue>> (Property, Variant); HashSet<TValue> current; if (value.Value == null || value.Source == ValueSource.Unset) current = new HashSet<TValue> (); diff --git a/Xamarin.PropertyEditing/ViewModels/ConstrainedPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/ConstrainedPropertyViewModel.cs index 5912bce..e29ec9d 100644 --- a/Xamarin.PropertyEditing/ViewModels/ConstrainedPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/ConstrainedPropertyViewModel.cs @@ -20,8 +20,8 @@ namespace Xamarin.PropertyEditing.ViewModels NullableConverter = new NullableConverter (t); } - protected ConstrainedPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + protected ConstrainedPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { this.selfConstraint = property as ISelfConstrainedPropertyInfo<T>; this.clampProperties = property as IClampedPropertyInfo; diff --git a/Xamarin.PropertyEditing/ViewModels/NumericPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/NumericPropertyViewModel.cs index 710023f..ed926f4 100644 --- a/Xamarin.PropertyEditing/ViewModels/NumericPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/NumericPropertyViewModel.cs @@ -8,8 +8,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class NumericPropertyViewModel<T> : ConstrainedPropertyViewModel<T> { - public NumericPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public NumericPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { this.raiseValue = new RelayCommand (() => { Value = Numeric<T>.Increment (Value); diff --git a/Xamarin.PropertyEditing/ViewModels/ObjectPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/ObjectPropertyViewModel.cs index a69c527..b99dc17 100644 --- a/Xamarin.PropertyEditing/ViewModels/ObjectPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/ObjectPropertyViewModel.cs @@ -26,8 +26,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class ObjectPropertyViewModel : PropertyViewModel<object> { - public ObjectPropertyViewModel (TargetPlatform targetPlatform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (targetPlatform, property, editors) + public ObjectPropertyViewModel (TargetPlatform targetPlatform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (targetPlatform, property, editors, variant) { if (targetPlatform == null) throw new ArgumentNullException (nameof(targetPlatform)); diff --git a/Xamarin.PropertyEditing/ViewModels/PointPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PointPropertyViewModel.cs index 4a6cd61..f37ebbe 100644 --- a/Xamarin.PropertyEditing/ViewModels/PointPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PointPropertyViewModel.cs @@ -6,8 +6,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class PointPropertyViewModel : PropertyViewModel<CommonPoint> { - public PointPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public PointPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { } diff --git a/Xamarin.PropertyEditing/ViewModels/PredefinedValuesViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PredefinedValuesViewModel.cs index 2e0dbf7..203cc39 100644 --- a/Xamarin.PropertyEditing/ViewModels/PredefinedValuesViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PredefinedValuesViewModel.cs @@ -8,8 +8,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class PredefinedValuesViewModel<TValue> : PropertyViewModel<TValue> { - public PredefinedValuesViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public PredefinedValuesViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { this.predefinedValues = property as IHavePredefinedValues<TValue>; if (this.predefinedValues == null) diff --git a/Xamarin.PropertyEditing/ViewModels/PropertiesViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PropertiesViewModel.cs index 47d84cb..6d4c376 100644 --- a/Xamarin.PropertyEditing/ViewModels/PropertiesViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PropertiesViewModel.cs @@ -458,8 +458,9 @@ namespace Xamarin.PropertyEditing.ViewModels return GetViewModelCore (property); } - private PropertyViewModel GetViewModelCore (IPropertyInfo property) + private PropertyViewModel GetViewModelCore (IPropertyInfo property, PropertyVariationSet variant = null) { + PropertyViewModel vm; Type[] interfaces = property.GetType ().GetInterfaces (); Type hasPredefinedValues = interfaces.FirstOrDefault (t => t.IsGenericType && t.GetGenericTypeDefinition () == typeof(IHavePredefinedValues<>)); @@ -469,13 +470,13 @@ namespace Xamarin.PropertyEditing.ViewModels ? typeof(CombinablePropertyViewModel<>).MakeGenericType (hasPredefinedValues.GenericTypeArguments[0]) : typeof(PredefinedValuesViewModel<>).MakeGenericType (hasPredefinedValues.GenericTypeArguments[0]); - return (PropertyViewModel) Activator.CreateInstance (type, TargetPlatform, property, this.objEditors); - } + vm = (PropertyViewModel) Activator.CreateInstance (type, TargetPlatform, property, this.objEditors, variant); + } else if (ViewModelMap.TryGetValue (property.Type, out var vmFactory)) + vm = vmFactory (TargetPlatform, property, this.objEditors, variant); + else + vm = new StringPropertyViewModel (TargetPlatform, property, this.objEditors, variant); - if (ViewModelMap.TryGetValue (property.Type, out var vmFactory)) - return vmFactory (TargetPlatform, property, this.objEditors); - - return new StringPropertyViewModel (TargetPlatform, property, this.objEditors); + return vm; } private Task busyTask; @@ -485,25 +486,25 @@ namespace Xamarin.PropertyEditing.ViewModels get; } = new AsyncWorkQueue(); - private static readonly Dictionary<Type, Func<TargetPlatform, IPropertyInfo, IEnumerable<IObjectEditor>, PropertyViewModel>> ViewModelMap = new Dictionary<Type, Func<TargetPlatform, IPropertyInfo, IEnumerable<IObjectEditor>, PropertyViewModel>> { - { typeof(string), (tp,p,e) => new StringPropertyViewModel (tp, p, e) }, - { typeof(bool), (tp,p,e) => new PropertyViewModel<bool?> (tp, p, e) }, - { typeof(float), (tp,p,e) => new NumericPropertyViewModel<float?> (tp, p, e) }, - { typeof(double), (tp,p,e) => new NumericPropertyViewModel<double?> (tp, p, e) }, - { typeof(int), (tp,p,e) => new NumericPropertyViewModel<int?> (tp, p, e) }, - { typeof(long), (tp,p,e) => new NumericPropertyViewModel<long?> (tp, p, e) }, - { typeof(CommonSolidBrush), (tp,p,e) => new BrushPropertyViewModel(tp, p, e, new[] {CommonBrushType.NoBrush, CommonBrushType.Solid, CommonBrushType.MaterialDesign, CommonBrushType.Resource }) }, - { typeof(CommonColor), (tp,p,e) => new BrushPropertyViewModel(tp, p, e, new[] {CommonBrushType.NoBrush, CommonBrushType.Solid, CommonBrushType.MaterialDesign, CommonBrushType.Resource }) }, - { typeof(CommonBrush), (tp,p,e) => new BrushPropertyViewModel(tp, p, e) }, - { typeof(CommonPoint), (tp,p,e) => new PointPropertyViewModel (tp, p, e) }, - { typeof(CommonSize), (tp,p,e) => new SizePropertyViewModel (tp, p, e) }, - { typeof(CommonRectangle), (tp,p,e) => new RectanglePropertyViewModel (tp, p, e) }, - { typeof(CommonThickness), (tp,p,e) => new ThicknessPropertyViewModel (tp, p, e) }, - { typeof(IList), (tp,p,e) => new CollectionPropertyViewModel (tp,p,e) }, - { typeof(BindingSource), (tp,p,e) => new PropertyViewModel<BindingSource> (tp, p, e) }, - { typeof(Resource), (tp,p,e) => new PropertyViewModel<Resource> (tp, p, e) }, - { typeof(object), (tp,p,e) => new ObjectPropertyViewModel (tp, p, e) }, - { typeof(CommonRatio), (tp, p, e) => new RatioViewModel (tp, p, e) }, + private static readonly Dictionary<Type, Func<TargetPlatform, IPropertyInfo, IEnumerable<IObjectEditor>, PropertyVariationSet, PropertyViewModel>> ViewModelMap = new Dictionary<Type, Func<TargetPlatform, IPropertyInfo, IEnumerable<IObjectEditor>, PropertyVariationSet, PropertyViewModel>> { + { typeof(string), (tp,p,e,v) => new StringPropertyViewModel (tp, p, e, v) }, + { typeof(bool), (tp,p,e,v) => new PropertyViewModel<bool?> (tp, p, e, v) }, + { typeof(float), (tp,p,e,v) => new NumericPropertyViewModel<float?> (tp, p, e, v) }, + { typeof(double), (tp,p,e,v) => new NumericPropertyViewModel<double?> (tp, p, e, v) }, + { typeof(int), (tp,p,e,v) => new NumericPropertyViewModel<int?> (tp, p, e, v) }, + { typeof(long), (tp,p,e,v) => new NumericPropertyViewModel<long?> (tp, p, e, v) }, + { typeof(CommonSolidBrush), (tp,p,e,v) => new BrushPropertyViewModel (tp, p, e, v, new[] {CommonBrushType.NoBrush, CommonBrushType.Solid, CommonBrushType.MaterialDesign, CommonBrushType.Resource }) }, + { typeof(CommonColor), (tp,p,e,v) => new BrushPropertyViewModel (tp, p, e, v, new[] {CommonBrushType.NoBrush, CommonBrushType.Solid, CommonBrushType.MaterialDesign, CommonBrushType.Resource }) }, + { typeof(CommonBrush), (tp,p,e,v) => new BrushPropertyViewModel (tp, p, e, v) }, + { typeof(CommonPoint), (tp,p,e,v) => new PointPropertyViewModel (tp, p, e, v) }, + { typeof(CommonSize), (tp,p,e,v) => new SizePropertyViewModel (tp, p, e, v) }, + { typeof(CommonRectangle), (tp,p,e,v) => new RectanglePropertyViewModel (tp, p, e, v) }, + { typeof(CommonThickness), (tp,p,e,v) => new ThicknessPropertyViewModel (tp, p, e, v) }, + { typeof(IList), (tp,p,e,v) => new CollectionPropertyViewModel (tp, p ,e, v) }, + { typeof(BindingSource), (tp,p,e,v) => new PropertyViewModel<BindingSource> (tp, p, e, v) }, + { typeof(Resource), (tp,p,e,v) => new PropertyViewModel<Resource> (tp, p, e, v) }, + { typeof(object), (tp,p,e,v) => new ObjectPropertyViewModel (tp, p, e, v) }, + { typeof(CommonRatio), (tp, p, e, v) => new RatioViewModel (tp, p, e, v) }, }; } } diff --git a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs index 4581143..eff58b9 100644 --- a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs @@ -22,8 +22,8 @@ namespace Xamarin.PropertyEditing.ViewModels DefaultValue = default(TValue); } - public PropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public PropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { if (property is IHaveInputModes inputModes) { InputModes = inputModes.InputModes.ToArray (); @@ -193,7 +193,7 @@ namespace Xamarin.PropertyEditing.ViewModels using (await AsyncWork.RequestAsyncWork (this)) { bool disagree = false; - ValueInfo<TValue>[] values = await Task.WhenAll (Editors.Where (e => e != null).Select (ed => ed.GetValueAsync<TValue> (Property, Variations)).ToArray ()); + ValueInfo<TValue>[] values = await Task.WhenAll (Editors.Where (e => e != null).Select (ed => ed.GetValueAsync<TValue> (Property, Variant)).ToArray ()); foreach (ValueInfo<TValue> valueInfo in values) { if (currentValue == null) currentValue = valueInfo; @@ -270,7 +270,7 @@ namespace Xamarin.PropertyEditing.ViewModels Task[] setValues = new Task[Editors.Count]; int i = 0; foreach (IObjectEditor editor in Editors) { - setValues[i++] = editor.SetValueAsync (Property, newValue); + setValues[i++] = editor.SetValueAsync (Property, newValue, Variant); } await Task.WhenAll (setValues); @@ -504,13 +504,14 @@ namespace Xamarin.PropertyEditing.ViewModels internal abstract class PropertyViewModel : EditorViewModel, INotifyDataErrorInfo { - protected PropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) + protected PropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) : base (platform, editors) { if (property == null) throw new ArgumentNullException (nameof (property)); Property = property; + Variant = variant; SetupConstraints (); this.requestResourceCommand = new RelayCommand (OnRequestResource, CanRequestResource); @@ -634,21 +635,24 @@ namespace Xamarin.PropertyEditing.ViewModels return (this.error != null) ? new [] { this.error } : Enumerable.Empty<string> (); } - /// <summary> - /// Gets or sets the current <see cref="PropertyVariation"/> that the value is currently looking at. - /// </summary> - public PropertyVariationSet Variations + public PropertyVariationSet Variant { - get { return this.variations; } - set - { - if (this.variations == value) - return; + get; + } - this.variations = value; - OnPropertyChanged (); - RequestCurrentValueUpdate(); + public override int CompareTo (EditorViewModel other) + { + int compare = base.CompareTo (other); + if (compare == 0 && other is PropertyViewModel pvm) { + if (ReferenceEquals (Variant, pvm.Variant)) + return 0; + if (Variant == null) + return -1; + if (pvm.Variant == null) + return 1; } + + return compare; } /// <param name="newError">The error message or <c>null</c> to clear the error.</param> @@ -728,7 +732,7 @@ namespace Xamarin.PropertyEditing.ViewModels private readonly RelayCommand requestResourceCommand; private ICommand setValueResourceCommand; private HashSet<IPropertyInfo> constraintProperties; - private PropertyVariationSet variations; + private PropertyVariationSet variant; private string error; private Task<bool> isAvailable; diff --git a/Xamarin.PropertyEditing/ViewModels/RatioViewModel.cs b/Xamarin.PropertyEditing/ViewModels/RatioViewModel.cs index 9c16d20..cf528df 100644 --- a/Xamarin.PropertyEditing/ViewModels/RatioViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/RatioViewModel.cs @@ -79,8 +79,8 @@ namespace Xamarin.PropertyEditing.ViewModels public static char[] Separators = { ':', '/' }; public static char[] SplitSeparators = { ':', '/', ' ' }; - public RatioViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public RatioViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant) + : base (platform, property, editors, variant) { } diff --git a/Xamarin.PropertyEditing/ViewModels/RectanglePropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/RectanglePropertyViewModel.cs index 86dda5f..33d7f7c 100644 --- a/Xamarin.PropertyEditing/ViewModels/RectanglePropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/RectanglePropertyViewModel.cs @@ -6,8 +6,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class RectanglePropertyViewModel : PropertyViewModel<CommonRectangle> { - public RectanglePropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public RectanglePropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { } diff --git a/Xamarin.PropertyEditing/ViewModels/SizePropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/SizePropertyViewModel.cs index 1736cc6..c2b5249 100644 --- a/Xamarin.PropertyEditing/ViewModels/SizePropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/SizePropertyViewModel.cs @@ -6,8 +6,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class SizePropertyViewModel : PropertyViewModel<CommonSize> { - public SizePropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public SizePropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { } diff --git a/Xamarin.PropertyEditing/ViewModels/StringPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/StringPropertyViewModel.cs index 9f0369a..2b2b9b9 100644 --- a/Xamarin.PropertyEditing/ViewModels/StringPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/StringPropertyViewModel.cs @@ -5,8 +5,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class StringPropertyViewModel : PropertyViewModel<string> { - public StringPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public StringPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { } } diff --git a/Xamarin.PropertyEditing/ViewModels/ThicknessPropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/ThicknessPropertyViewModel.cs index 3f36f6a..0c60c97 100644 --- a/Xamarin.PropertyEditing/ViewModels/ThicknessPropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/ThicknessPropertyViewModel.cs @@ -10,8 +10,8 @@ namespace Xamarin.PropertyEditing.ViewModels internal class ThicknessPropertyViewModel :PropertyViewModel<CommonThickness> { - public ThicknessPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors) - : base (platform, property, editors) + public ThicknessPropertyViewModel (TargetPlatform platform, IPropertyInfo property, IEnumerable<IObjectEditor> editors, PropertyVariationSet variant = null) + : base (platform, property, editors, variant) { } |