aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.xaml
blob: ea769ed40b0828274e21e80a06fdafb6eed96747 (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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<Application x:Class="Tango.PanelPC.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.PanelPC.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>
				<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
				<!-- Accent and AppTheme setting -->
				<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml">
				</ResourceDictionary>
				<!--Material Design-->
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/materialdesigncolor.blue.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/materialdesigncolor.yellow.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListBox.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.TextBlock.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Label.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Slider.xaml">
				</ResourceDictionary>
				<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.ProgressBar.xaml"/>

				<!--MahApps Brushes-->
				<ResourceDictionary>
					<SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource Primary700}" />
					<SolidColorBrush x:Key="AccentColorBrush" Color="{DynamicResource Primary500}" />
					<SolidColorBrush x:Key="AccentColorBrush2" Color="{DynamicResource Primary400}" />
					<SolidColorBrush x:Key="AccentColorBrush3" Color="{DynamicResource Primary300}" />
					<SolidColorBrush x:Key="AccentColorBrush4" Color="{DynamicResource Primary200}" />
					<SolidColorBrush x:Key="WindowTitleColorBrush" Color="{DynamicResource Primary700}" />
					<SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{DynamicResource Primary500Foreground}" />
					<LinearGradientBrush x:Key="ProgressBrush" EndPoint="0.001,0.5" StartPoint="1.002,0.5">
						<GradientStop Color="{DynamicResource Primary700}" Offset="0" />
						<GradientStop Color="{DynamicResource Primary300}" Offset="1" />
					</LinearGradientBrush>
					<SolidColorBrush x:Key="CheckmarkFill" Color="{DynamicResource Primary500}" />
					<SolidColorBrush x:Key="RightArrowFill" Color="{DynamicResource Primary500}" />
					<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" />
					<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" />
				</ResourceDictionary>

				<!--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 Source="Resources/Styles.xaml"></ResourceDictionary>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
    </Application.Resources>
</Application>