aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Resources/Styles.xaml
blob: eaf621571d75ea4b15d2204b4e4413a656f79217 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
                    xmlns:converters="clr-namespace:Tango.PPC.Events.Converters"
                    xmlns:local="clr-namespace:Tango.PPC.Events.Resources">

    <!--Events Grid-->
    <Style x:Key="TangoEventsGrid" TargetType="{x:Type touch:LightTouchDataGrid}" BasedOn="{StaticResource {x:Type touch:LightTouchDataGrid}}">
        <Style.Resources>

            <converters:MachineEventToViewConverter x:Key="MachineEventToViewConverter" />

            <Style TargetType="{x:Type touch:LightTouchDataGridHeaderRow}" BasedOn="{StaticResource {x:Type touch:LightTouchDataGridHeaderRow}}">
                <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
                <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
                <Setter Property="BorderThickness" Value="1"></Setter>
                <Setter Property="BorderBrush" Value="{StaticResource TangoLowAccentBrush}"></Setter>
                <Setter Property="Height" Value="68"></Setter>
                <Setter Property="Margin" Value="5 0 5 5"></Setter>
                <Setter Property="CornerRadius" Value="5"></Setter>
                <!--<Setter Property="Effect">
                    <Setter.Value>
                        <DropShadowEffect BlurRadius="5" ShadowDepth="1" Color="Silver" />
                    </Setter.Value>
                </Setter>-->
            </Style>

            <Style TargetType="{x:Type touch:LightTouchDataGridRow}">
                <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter>
                <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
                <Setter Property="BorderThickness" Value="1"></Setter>
                <Setter Property="BorderBrush" Value="{StaticResource TangoLightBorderBrush}"></Setter>
                <Setter Property="Padding" Value="5"></Setter>
                <Setter Property="CornerRadius" Value="5"></Setter>
                <Setter Property="Margin" Value="5 4"></Setter>
                <Setter Property="Height" Value="Auto"></Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type touch:LightTouchDataGridRow}">
                            <Border DockPanel.Dock="Top" Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            CornerRadius="{TemplateBinding CornerRadius}"
                            Padding="{TemplateBinding Padding}">

                                <DockPanel>
                                    <ContentPresenter Height="78" DockPanel.Dock="Top" Content="{TemplateBinding Content}" />

                                    <Grid Margin="10" Visibility="{Binding RelativeSource={RelativeSource AncestorType=touch:LightTouchDataGridRow},Path=IsSelected,Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <ContentControl>
                                            <ContentControl.Style>
                                                <Style TargetType="ContentControl">
                                                    <Setter Property="Content" Value="{x:Null}"></Setter>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=Visibility}" Value="Visible">
                                                            <Setter Property="Content" Value="{Binding Converter={StaticResource MachineEventToViewConverter}}"></Setter>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </ContentControl.Style>
                                        </ContentControl>
                                    </Grid>
                                </DockPanel>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=IsSelected}" Value="True">
                        <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter>
                        <DataTrigger.EnterActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:00" />
                                    <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:00" />
                                </Storyboard>
                            </BeginStoryboard>
                        </DataTrigger.EnterActions>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style TargetType="{x:Type touch:LightTouchDataGridCell}" BasedOn="{StaticResource {x:Type touch:LightTouchDataGridCell}}">

            </Style>
        </Style.Resources>
    </Style>

    <Style x:Key="TangoEventsGridHistory" TargetType="{x:Type touch:LightTouchDataGrid}" BasedOn="{StaticResource {x:Type touch:LightTouchDataGrid}}">
        <Style.Resources>

            <converters:MachineEventToViewConverter x:Key="MachineEventToViewConverter" />

            <Style TargetType="{x:Type touch:LightTouchDataGridHeaderRow}" BasedOn="{StaticResource {x:Type touch:LightTouchDataGridHeaderRow}}">
                <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
                <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
                <Setter Property="BorderThickness" Value="1"></Setter>
                <Setter Property="BorderBrush" Value="{StaticResource TangoLowAccentBrush}"></Setter>
                <Setter Property="Height" Value="68"></Setter>
                <Setter Property="Margin" Value="5 0 5 5"></Setter>
                <Setter Property="CornerRadius" Value="5"></Setter>
                <Setter Property="Effect">
                    <Setter.Value>
                        <DropShadowEffect BlurRadius="5" ShadowDepth="1" Color="Silver" />
                    </Setter.Value>
                </Setter>
            </Style>

            <Style TargetType="{x:Type touch:LightTouchDataGridRow}">
                <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter>
                <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
                <Setter Property="BorderThickness" Value="1"></Setter>
                <Setter Property="BorderBrush" Value="{StaticResource TangoLightBorderBrush}"></Setter>
                <Setter Property="Padding" Value="5"></Setter>
                <Setter Property="CornerRadius" Value="5"></Setter>
                <Setter Property="Margin" Value="5 4"></Setter>
                <Setter Property="Height" Value="Auto"></Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type touch:LightTouchDataGridRow}">
                            <Border DockPanel.Dock="Top" Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            CornerRadius="{TemplateBinding CornerRadius}"
                            Padding="{TemplateBinding Padding}">
                                <ContentPresenter Height="78" DockPanel.Dock="Top" Content="{TemplateBinding Content}" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style TargetType="{x:Type touch:LightTouchDataGridCell}" BasedOn="{StaticResource {x:Type touch:LightTouchDataGridCell}}">

            </Style>
        </Style.Resources>
    </Style>
    <!--Events Grid-->

</ResourceDictionary>