diff options
author | Bertrand Le Roy <beleroy@microsoft.com> | 2017-11-06 21:56:15 +0300 |
---|---|---|
committer | Bertrand Le Roy <beleroy@microsoft.com> | 2017-11-06 21:56:15 +0300 |
commit | e221b598b84fe7926a18a17aaa16f54ab5a83dd1 (patch) | |
tree | e9ed08c4ddb8e74c193fec9aa64f1ac640b6a918 /Xamarin.PropertyEditing.Windows.Standalone | |
parent | 5357f4e28f39e0705d3d1c939b004fd9cdbdbeb3 (diff) |
Add a sample read-only brush property to the sample Windows app
Diffstat (limited to 'Xamarin.PropertyEditing.Windows.Standalone')
-rw-r--r-- | Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs b/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs index b9303ea..e2e30e8 100644 --- a/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs +++ b/Xamarin.PropertyEditing.Windows.Standalone/MockedSampleControlButton.cs @@ -8,11 +8,22 @@ namespace Xamarin.PropertyEditing.Windows.Standalone public MockedSampleControlButton () : base (new MockSampleControl ()) { // TODO: Move the declaration of this property to MockSampleControl once SolidBrush is supported on both platforms. - var brushPropertyInfo = new BrushPropertyInfo ("SolidBrush", "Windows Only", true, - new[] { "RGB", "sRGB" }); + var brushPropertyInfo = new BrushPropertyInfo ( + name: "SolidBrush", + category: "Windows Only", + canWrite: true, + colorSpaces: new[] { "RGB", "sRGB" }); MockedControl.AddProperty<CommonBrush> (brushPropertyInfo); MockedControl.SetValue<CommonBrush>(brushPropertyInfo, new CommonSolidBrush(20, 120, 220, 240, "sRGB")); + + var readOnlyBrushPropertyInfo = new BrushPropertyInfo( + name: "ReadOnlySolidBrush", + category: "Windows Only", + canWrite: false); + MockedControl.AddProperty<CommonBrush> (readOnlyBrushPropertyInfo); + MockedControl.SetValue<CommonBrush> (readOnlyBrushPropertyInfo, + new CommonSolidBrush (240, 220, 15, 190)); } } } |