aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-24 18:39:34 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-24 18:39:34 +0300
commit545f603c873cd026faf5560dae83da947f0a02a6 (patch)
tree8022cfdbe21c6aefd68e0c7994d756e611183ef8 /Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml
parenta34ee775bfe3001f562627963a4472e7df8e30b0 (diff)
downloadTango-545f603c873cd026faf5560dae83da947f0a02a6.tar.gz
Tango-545f603c873cd026faf5560dae83da947f0a02a6.zip
Working on PPC!!!!!!
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml38
1 files changed, 38 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml
new file mode 100644
index 000000000..61d2f0ca7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.xaml
@@ -0,0 +1,38 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:components="clr-namespace:Tango.Touch.Components"
+ xmlns:local="clr-namespace:Tango.Touch.Controls">
+
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="../Resources/Colors.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+
+ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+
+ <Style TargetType="{x:Type local:TouchToggleIconButton}">
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="CheckedForeground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type local:TouchToggleIconButton}">
+ <Border Background="{TemplateBinding Background}"
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}">
+ <components:Ripple CornerRadius="{TemplateBinding CornerRadius}" RippleBrush="{StaticResource TangoRippleDarkBrush}">
+ <Grid Margin="{TemplateBinding Padding}">
+ <fa:ImageAwesome Icon="{TemplateBinding Icon}" Foreground="{TemplateBinding Foreground}" Visibility="{TemplateBinding IsChecked,Converter={StaticResource BooleanToVisibilityInverseConverter}}" />
+ <fa:ImageAwesome Icon="{TemplateBinding CheckedIcon}" Foreground="{TemplateBinding CheckedForeground}" Visibility="{TemplateBinding IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" />
+ </Grid>
+ </components:Ripple>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file