aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
blob: ddfb18c60fbc7a869a66fff6933d568ac714e800 (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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<Application x:Class="Tango.PPC.UI.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			  xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
             xmlns:local="clr-namespace:Tango.PPC.UI"
             StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <Application.Resources>
		<ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Colors.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Fonts.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchToggleButton.xaml" />

                <!--Styles-->
				<ResourceDictionary>
					<Style TargetType="{x:Type ListBoxItem}" x:Key="basicListBoxItem">
						<Setter Property="Background" Value="Transparent"/>
						<Setter Property="BorderThickness" Value="0"></Setter>
						<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
						<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
						<Setter Property="Padding" Value="0"/>
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="{x:Type ListBoxItem}">
									<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Padding="0" SnapsToDevicePixels="true">
										<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
									</Border>
									<ControlTemplate.Triggers>
										<Trigger Property="IsSelected" Value="true">
											<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
										</Trigger>
										<MultiTrigger>
											<MultiTrigger.Conditions>
												<Condition Property="IsSelected" Value="true"/>
												<Condition Property="Selector.IsSelectionActive" Value="false"/>
											</MultiTrigger.Conditions>
											<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
										</MultiTrigger>
										<Trigger Property="IsEnabled" Value="false">
											<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
										</Trigger>
									</ControlTemplate.Triggers>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>

					<Style x:Key="emptyToggleButton" TargetType="ToggleButton">
						<Setter Property="Background" Value="Transparent" />
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="ToggleButton">
									<Grid Background="{TemplateBinding Background}">
										<ContentPresenter />
									</Grid>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>

					<Style x:Key="emptyButton" TargetType="Button">
						<Setter Property="Background" Value="Transparent" />
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="Button">
									<Grid Background="{TemplateBinding Background}">
										<ContentPresenter />
									</Grid>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>

					<!--Drag & Drop-->
					<Style x:Key="draggableGrid" TargetType="Grid">
						<Setter Property="RenderTransform">
							<Setter.Value>
								<ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
							</Setter.Value>
						</Setter>
						<Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
						<Setter Property="Background" Value="Transparent"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.Draggable" Value="True"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
					</Style>

					<Style x:Key="droppableGrid" TargetType="Grid">
						<Setter Property="RenderTransform">
							<Setter.Value>
								<ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
							</Setter.Value>
						</Setter>
						<Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
						<Setter Property="Background" Value="Transparent"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.Droppable" Value="True"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
						<Style.Triggers>
							<Trigger Property="dragAndDrop:DragAndDropService.IsDraggableOver" Value="True">
								<Setter Property="Opacity" Value="0.5"></Setter>
								<Trigger.EnterActions>
									<BeginStoryboard>
										<Storyboard>
											<DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
											<DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
										</Storyboard>
									</BeginStoryboard>
								</Trigger.EnterActions>
								<Trigger.ExitActions>
									<BeginStoryboard>
										<Storyboard>
											<DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
											<DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
										</Storyboard>
									</BeginStoryboard>
								</Trigger.ExitActions>
							</Trigger>
						</Style.Triggers>
					</Style>

					<Style x:Key="draggableDroppableGrid" TargetType="Grid">
						<Setter Property="RenderTransform">
							<Setter.Value>
								<ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
							</Setter.Value>
						</Setter>
						<Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
						<Setter Property="Background" Value="Transparent"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.Draggable" Value="True"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.Droppable" Value="True"></Setter>
						<Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
						<Style.Triggers>
							<Trigger Property="dragAndDrop:DragAndDropService.IsDraggableOver" Value="True">
								<Setter Property="Opacity" Value="0.5"></Setter>
								<Trigger.EnterActions>
									<BeginStoryboard>
										<Storyboard>
											<DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
											<DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
										</Storyboard>
									</BeginStoryboard>
								</Trigger.EnterActions>
								<Trigger.ExitActions>
									<BeginStoryboard>
										<Storyboard>
											<DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
											<DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
										</Storyboard>
									</BeginStoryboard>
								</Trigger.ExitActions>
							</Trigger>
						</Style.Triggers>
					</Style>
					<!--Drag & Drop-->

					<!--Extensions-->

				</ResourceDictionary>

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