aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/TextIconButton.xaml
blob: 20228582cd2973e756feb6db6b3e51cbd1ba2f08 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
                    xmlns:local="clr-namespace:Tango.FSE.Common.Controls">

    <Style TargetType="{x:Type local:TextIconButton}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <DockPanel>
                        <material:PackIcon Margin="-5 0 0 0" Width="Auto" Height="Auto" Kind="{Binding RelativeSource={RelativeSource AncestorType=local:TextIconButton},Path=Icon}" VerticalAlignment="Center" />
                        <Label TextElement.Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:TextIconButton},Path=Foreground}" VerticalAlignment="Center" Content="{Binding}"></Label>
                    </DockPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="FSE_TextIconButton_Dark" TargetType="{x:Type local:TextIconButton}" BasedOn="{StaticResource FSE_RaisedButton_Dark_Hover}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <DockPanel>
                        <material:PackIcon Margin="-5 0 0 0" Width="Auto" Height="Auto" Kind="{Binding RelativeSource={RelativeSource AncestorType=local:TextIconButton},Path=Icon}" VerticalAlignment="Center" />
                        <Label TextElement.Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:TextIconButton},Path=Foreground}"  VerticalAlignment="Center" Content="{Binding}"></Label>
                    </DockPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="FSE_TextIconButton_Flat_Accent" TargetType="{x:Type local:TextIconButton}" BasedOn="{StaticResource FSE_FlatButton_ForegroundAccentHover}">
        <Setter Property="BorderThickness" Value="0"></Setter>
        <Setter Property="Padding" Value="0"></Setter>
        <Setter Property="material:ShadowAssist.ShadowDepth" Value="Depth0"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <DockPanel>
                        <material:PackIcon Margin="-5 0 0 0" Width="Auto" Height="Auto" Kind="{Binding RelativeSource={RelativeSource AncestorType=local:TextIconButton},Path=Icon}" VerticalAlignment="Center" />
                        <Label TextElement.Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:TextIconButton},Path=Foreground}"  VerticalAlignment="Center" Content="{Binding}"></Label>
                    </DockPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>