aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/Shared.xaml
blob: 9530b1b734775ce12d09bbae24af4de07cbf3dbc (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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Tango.Touch.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Resources/Colors.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="Border" x:Key="DropShadowBorder">
        <Setter Property="CornerRadius" Value="{Binding RelativeSource={RelativeSource AncestorType=local:ITouchControl},Path=CornerRadius,FallbackValue=0}"></Setter>
        <Setter Property="Effect" Value="{x:Null}"></Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ITouchControl},Path=EnableDropShadow}" Value="True">
                <Setter Property="Effect">
                    <Setter.Value>
                        <DropShadowEffect BlurRadius="{Binding RelativeSource={RelativeSource AncestorType=local:ITouchControl},Path=BlurRadius,FallbackValue=0}" ShadowDepth="{Binding RelativeSource={RelativeSource AncestorType=local:ITouchControl},Path=ShadowDepth,FallbackValue=0}" Color="{Binding RelativeSource={RelativeSource AncestorType=local:ITouchControl},Path=ShadowColor}" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="Border" x:Key="TangoTouchBorder">
        <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter>
        <Setter Property="CornerRadius" Value="3"></Setter>
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" ShadowDepth="0" />
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>