Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Le Roy <beleroy@microsoft.com>2018-02-15 07:40:10 +0300
committerBertrand Le Roy <beleroy@microsoft.com>2018-02-15 19:26:08 +0300
commitd5f5eba0188d4521e25b33ed2cad4177339767eb (patch)
tree9a9f9f9a665582888c452442184ba884dbde65f7
parent4a86ad8b4801cb91aee50302d8b9eff265ddea04 (diff)
Add a setting to control the visibility of the opacity editor UI
-rw-r--r--Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs1
-rw-r--r--Xamarin.PropertyEditing.Windows/Themes/Resources.xaml2
-rw-r--r--Xamarin.PropertyEditing/TargetPlatform.cs6
3 files changed, 8 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
index eb5751a..59fc4b6 100644
--- a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
+++ b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
@@ -18,6 +18,7 @@ namespace Xamarin.PropertyEditing.Windows.Standalone
this.panel.TargetPlatform = new TargetPlatform {
SupportsCustomExpressions = true,
SupportsMaterialDesign = true,
+ SupportsBrushOpacity = false,
GroupedTypes = new Dictionary<Type, string> {
{ typeof(CommonBrush), "Brush" }
}
diff --git a/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml b/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml
index e96e95b..469a98b 100644
--- a/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml
+++ b/Xamarin.PropertyEditing.Windows/Themes/Resources.xaml
@@ -601,7 +601,7 @@
<local:MaterialDesignColorEditorControl x:Name="materialDesignColorEditor" Visibility="Collapsed"/>
</StackPanel>
</Border>
- <Border Padding="1">
+ <Border Padding="1" Visibility="{Binding TargetPlatform.SupportsBrushOpacity, Mode=OneTime, Converter={StaticResource BoolToVisibilityConverter}}">
<Expander Name="advancedPropertyPanel" Template="{DynamicResource AdvancedPropertiesExpander}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
Background="{DynamicResource PanelGroupSecondaryBackgroundBrush}" Foreground="{DynamicResource PanelForegroundBrush}">
<Expander.Content>
diff --git a/Xamarin.PropertyEditing/TargetPlatform.cs b/Xamarin.PropertyEditing/TargetPlatform.cs
index fe8cc47..2cc42fc 100644
--- a/Xamarin.PropertyEditing/TargetPlatform.cs
+++ b/Xamarin.PropertyEditing/TargetPlatform.cs
@@ -28,6 +28,12 @@ namespace Xamarin.PropertyEditing
set;
}
+ public bool SupportsBrushOpacity
+ {
+ get;
+ set;
+ }
+
/// <summary>
/// Gets a dictionary defining the property types will be grouped into a single editor and their groups resource name.
/// </summary>