diff options
author | Bertrand Le Roy <beleroy@microsoft.com> | 2018-06-12 05:47:09 +0300 |
---|---|---|
committer | Bertrand Le Roy <beleroy@microsoft.com> | 2018-06-20 21:23:50 +0300 |
commit | f0d6d95a08a67d263cdffe65cf6cac67cb243be2 (patch) | |
tree | f41b5a0e18e8614facd224f3a9ed16cd44705c87 /Xamarin.PropertyEditing.Windows.Standalone | |
parent | 0cec86376f629b4dfc682797557a70c591fc1a84 (diff) |
Allow for properties of type CommonColor.
Diffstat (limited to 'Xamarin.PropertyEditing.Windows.Standalone')
-rw-r--r-- | Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs b/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs index ef6ff12..5514b53 100644 --- a/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs +++ b/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs @@ -28,6 +28,13 @@ namespace Xamarin.PropertyEditing.Windows.Standalone category: "Windows Only", canWrite: false); MockedControl.AddProperty<CommonBrush> (this.readOnlyBrushPropertyInfo); + + this.colorPropertyInfo = new MockPropertyInfo<CommonColor> ( + name: "ColorNoBrush", + category: "Windows Only", + canWrite: true, + valueSources: ValueSources.Default | ValueSources.Local | ValueSources.Resource); + MockedControl.AddProperty<CommonColor> (this.colorPropertyInfo); } public async Task SetBrushInitialValueAsync (IObjectEditor editor, CommonBrush brush) @@ -51,9 +58,10 @@ namespace Xamarin.PropertyEditing.Windows.Standalone this.readOnlyBrushSet = true; } - private IPropertyInfo brushPropertyInfo; - private IPropertyInfo materialDesignBrushPropertyInfo; - private IPropertyInfo readOnlyBrushPropertyInfo; + private readonly IPropertyInfo brushPropertyInfo; + private readonly IPropertyInfo materialDesignBrushPropertyInfo; + private readonly IPropertyInfo readOnlyBrushPropertyInfo; + private readonly IPropertyInfo colorPropertyInfo; private bool brushSet = false; private bool materialDesignBrushSet = false; private bool readOnlyBrushSet = false; |