aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml
blob: 5619b9136478adad2a581a275d618e720769ca41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<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:local="clr-namespace:Tango.Touch.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Controls/TouchButton.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type local:TouchIconButton}" BasedOn="{StaticResource {x:Type local:TouchButton}}">
        <Setter Property="Icon" Value="None"></Setter>
        <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <fa:ImageAwesome Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:TouchIconButton},Path=Foreground}" Icon="{Binding RelativeSource={RelativeSource AncestorType=local:TouchIconButton},Path=Icon}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>