diff options
author | Dominique Louis <savagesoftware@gmail.com> | 2018-03-21 13:09:32 +0300 |
---|---|---|
committer | Dominique Louis <savagesoftware@gmail.com> | 2018-04-10 01:01:10 +0300 |
commit | ca76218dcd19ecadd5052766e07b6fc0ce39578d (patch) | |
tree | 67658e522065de160638fd68d012ce34232f05d8 /Xamarin.PropertyEditing.Tests | |
parent | adc2724fb684cf2459f8f3f5441fc643f9dab811 (diff) |
[Mac]Initial implementation for Combinable Property Editor
Diffstat (limited to 'Xamarin.PropertyEditing.Tests')
-rw-r--r-- | Xamarin.PropertyEditing.Tests/MockControls/MockSampleControl.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Xamarin.PropertyEditing.Tests/MockControls/MockSampleControl.cs b/Xamarin.PropertyEditing.Tests/MockControls/MockSampleControl.cs index 0d30e58..cc40ceb 100644 --- a/Xamarin.PropertyEditing.Tests/MockControls/MockSampleControl.cs +++ b/Xamarin.PropertyEditing.Tests/MockControls/MockSampleControl.cs @@ -14,7 +14,8 @@ namespace Xamarin.PropertyEditing.Tests.MockControls AddProperty<float> ("FloatingPoint", ReadWrite); AddProperty<string> ("String", ReadWrite); AddProperty<Enumeration> ("Enumeration", ReadWrite); - AddProperty<Flags> ("Flags", ReadWrite, canWrite: true, flag: true); + AddProperty<FlagsNoValues> ("FlagsNoValues", ReadWrite, canWrite: true, flag: true); + AddProperty<FlagsWithValues> ("FlagsWithValues", ReadWrite, canWrite: true, flag: true); AddProperty<CommonPoint> ("Point", ReadWrite); AddProperty<CommonSize> ("Size", ReadWrite); AddProperty<CommonRectangle> ("Rectangle", ReadWrite); @@ -25,7 +26,8 @@ namespace Xamarin.PropertyEditing.Tests.MockControls AddReadOnlyProperty<float> ("ReadOnlyFloatingPoint", ReadOnly); AddReadOnlyProperty<string> ("ReadOnlyString", ReadOnly); AddReadOnlyProperty<Enumeration> ("ReadOnlyEnumeration", ReadOnly); - AddProperty<Flags> ("ReadOnlyFlags", ReadOnly, canWrite: false, flag: true); + AddProperty<FlagsNoValues> ("ReadOnlyFlagsNotValue", ReadOnly, canWrite: false, flag: true); + AddProperty<FlagsWithValues> ("ReadOnlyFlagsWithValues", ReadOnly, canWrite: false, flag: true); AddReadOnlyProperty<CommonPoint> ("ReadOnlyPoint", ReadOnly); AddReadOnlyProperty<CommonSize> ("ReadOnlySize", ReadOnly); AddReadOnlyProperty<CommonRectangle> ("ReadOnlyRectangle", ReadOnly); @@ -49,12 +51,20 @@ namespace Xamarin.PropertyEditing.Tests.MockControls ThirdOption } + [Flags] // Treated like a 0 based Enum + public enum FlagsNoValues + { + FlagNoValueZero, + FlagNoValueOne, + FlagNoValueTwo, + } + [Flags] - public enum Flags + public enum FlagsWithValues { - FlagOne, - FlagTwo, - FlagThree + FlagHasValueOne = 1, + FlagHasValueTwo = 2, + FlagHasValueFour = 4, } } } |