aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
blob: 8896a2d35084ed3dbc6eb957067153923d18659b (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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
                    xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
                     xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources">
    <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.lightblue.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>
        
        <!--Fonts-->
        <ResourceDictionary>
            <FontFamily x:Key="digital-7">../Fonts/#digital-7</FontFamily>
        </ResourceDictionary>

        <!--Styles-->
        <ResourceDictionary>

            <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
            <converters:TextFieldHintVisibilityConverter x:Key="TextFieldHintVisibilityConverter" />

            <Style TargetType="editors:AutoCompleteTextBox" >
                <Setter Property="Focusable" Value="True" />
                <Setter Property="BorderThickness" Value="0 0 0 1"/>
                <Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}" />
                <Setter Property="Background" Value="Transparent"/>
                <!--<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>-->
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                <Setter Property="VerticalContentAlignment" Value="Top"/>
                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                <Setter Property="AllowDrop" Value="true"/>
                <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
                <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
                <Setter Property="Validation.ErrorTemplate" Value="{DynamicResource MaterialDesignValidationErrorTemplate}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type editors:AutoCompleteTextBox}">
                            <Grid>
                                <DockPanel>
                                    <ContentPresenter ContentSource="Icon"
                                                  x:Name="PART_Icon"
                                                  Visibility="{TemplateBinding IconVisibility}" />
                                    <Grid>
                                        <TextBlock x:Name="PART_Watermark"
                                               Text="{TemplateBinding Watermark}"
                                               Visibility="Collapsed"
                                               VerticalAlignment="Center"
                                               HorizontalAlignment="Left"
                                               Focusable="False"
                                               Foreground="Gray"
                                               Margin="3,0" />
                                        <TextBox x:Name="PART_Editor"
                                             Focusable="True"
                                             HorizontalAlignment="Stretch"
                                             VerticalAlignment="Center"
                                             Style="{StaticResource ResourceKey=MaterialDesignTextBox}"
                                             MaxLength="{Binding Path=MaxLength, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}"
                                             CharacterCasing="{Binding Path=CharacterCasing, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}"
                                             Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" />
                                    </Grid>
                                </DockPanel>
                                <Popup x:Name="PART_Popup"
                                   IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}"
                                   Width="{TemplateBinding ActualWidth}"
                                   HorizontalOffset="0"
                                   MinHeight="25"
                                   MaxHeight="600"
                                   AllowsTransparency="True"
                                   PopupAnimation="Slide"
                                   Focusable="False">
                                    <Border Background="White"
                                        BorderThickness="1"
                                        BorderBrush="#BDBDBD"
                                        CornerRadius="0"
                                        Padding="2">
                                        <Grid>
                                            <ListBox x:Name="PART_Selector"
                                                 ItemTemplate="{TemplateBinding ItemTemplate}"
                                                 ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                                 Focusable="False"
                                                 BorderThickness="0"
                                                 MaxHeight="{Binding Path=MaxPopupHeight, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}"
                                                 ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                                                >
                                            </ListBox>
                                            <Border Visibility="{Binding Path=IsLoading, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource   ResourceKey=BoolToVisConverter}}">
                                                <ContentPresenter ContentSource="LoadingContent"/>
                                            </Border>
                                        </Grid>
                                    </Border>
                                </Popup>

                            </Grid>
                            <!--</Border>-->
                            <ControlTemplate.Triggers>
                                <Trigger Property="Text"
                                 Value=""
                                 SourceName="PART_Editor">
                                    <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="PART_Watermark" />
                                </Trigger>
                                <Trigger Property="IconPlacement"
                                 Value="Left">
                                    <Setter Property="DockPanel.Dock"
                                    Value="Left"
                                    TargetName="PART_Icon" />
                                </Trigger>
                                <Trigger Property="IconPlacement"
                                 Value="Right">
                                    <Setter Property="DockPanel.Dock"
                                    Value="Right"
                                    TargetName="PART_Icon" />
                                </Trigger>
                                <Trigger Property="Validation.HasError" Value="True">
                                    <Setter Property="BorderBrush"
                                    Value="Red"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            
            <!--Extensions-->

            <FontFamily x:Key="FontName">Segoe UI</FontFamily>
            <FontFamily x:Key="NotesFont">Lucida Console</FontFamily>

            <sys:Double x:Key="ExtraExtraLargeFontSize">28</sys:Double>
            <sys:Double x:Key="ExtraLargeFontSize">26</sys:Double>
            <sys:Double x:Key="LargeFontSize">20</sys:Double>
            <sys:Double x:Key="MediumFontSize">16</sys:Double>
            <sys:Double x:Key="SmallFontSize">14</sys:Double>
            <sys:Double x:Key="MiniFontSize">12</sys:Double>
            <sys:Double x:Key="TinyFontSize">9</sys:Double>

            <!--Colors-->
            <Color x:Key="borderColor">Silver</Color>
            <Color x:Key="graphGridLinesColor">#FFE9E9E9</Color>
            <Color x:Key="graphsMarkerColor">Gray</Color>
            <Color x:Key="materialColor">#03A9F4</Color>

            <!--Brushes-->
            <SolidColorBrush x:Key="borderBrush" Color="{StaticResource borderColor}"></SolidColorBrush>
            <SolidColorBrush x:Key="graphGridLinesBrush" Color="{StaticResource graphGridLinesColor}"></SolidColorBrush>
            <SolidColorBrush x:Key="BlackBrush" Color="#545454"></SolidColorBrush>

            <SolidColorBrush x:Key="graphGridLinesLightBrush" Color="{StaticResource graphGridLinesColor}"></SolidColorBrush>
            <SolidColorBrush x:Key="graphGridLinesDarkBrush" Color="#FF2E2E2E"></SolidColorBrush>

            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphBackgroundLight">
                <GradientStop Color="White"/>
                <GradientStop Color="#FFE9E9E9" Offset="1"/>
            </LinearGradientBrush>

            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphBackgroundDark">
                <GradientStop Color="Black"/>
                <GradientStop Color="#FF333333" Offset="1"/>
            </LinearGradientBrush>

            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphBackground">
                <GradientStop Color="White"/>
                <GradientStop Color="#FFE9E9E9" Offset="1"/>
            </LinearGradientBrush>

            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphLabelBackground" Opacity="0.7">
                <GradientStop Color="White"/>
                <GradientStop Color="#FFD9D9D9" Offset="1"/>
            </LinearGradientBrush>

            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  x:Key="graphLegendBackground" Opacity="0.7">
                <GradientStop Color="#FFE9E9E9"/>
                <GradientStop Color="#FFBDBDBD" Offset="1"/>
            </LinearGradientBrush>

            <SolidColorBrush Color="#FFF1F1F1" x:Key="topBarBackgroundBrush"></SolidColorBrush>
            <!--Brushes-->

            <!--Graph Label-->
            <Style x:Key="graphLabel" TargetType="Label">
                <Style.Setters>
                    <Setter Property="IsHitTestVisible" Value="False"></Setter>
                    <Setter Property="Margin" Value="-1 -1 0 0"></Setter>
                    <Setter Property="HorizontalAlignment" Value="Left"></Setter>
                    <Setter Property="VerticalAlignment" Value="Top"></Setter>
                    <Setter Property="Padding" Value="0"></Setter>
                    <Setter Property="ContentTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <Border Width="Auto" Padding="0 0 20 0" Height="25" BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1" CornerRadius="0 0 30 0" Background="{StaticResource graphLabelBackground}" >
                                    <Label Margin="5 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource TinyFontSize}" Content="{Binding}"></Label>
                                </Border>
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </Style.Setters>
            </Style>
            <!--Graph Label-->


            <!--Graph Ticks Template-->
            <DataTemplate x:Key="graphTicksTemplate">
                <Ellipse Width="3" Height="3" Margin="0 0 0 0" Fill="{StaticResource AccentColorBrush}"></Ellipse>
            </DataTemplate>
            <!--Graph Ticks Template-->

            <DataTemplate x:Key="graphTooltipTemplate">
                <Border CornerRadius="5" BorderThickness="1" BorderBrush="White" Padding="8" MinWidth="50" Margin="20 0 20 0">
                    <Border.Background>
                        <SolidColorBrush Color="Black" Opacity="0.5"></SolidColorBrush>
                    </Border.Background>
                    <TextBlock Foreground="White" FontSize="10" HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding StringFormat='0.000'}"></TextBlock>
                </Border>
            </DataTemplate>

            <!--Graph Legend Template-->
            <DataTemplate x:Key="graphLegendTemplate">
                <Border Width="20" Height="20" Margin="2">
                    <Grid>
                        <ToggleButton IsChecked="{Binding IsVisible}" Padding="0" Margin="0" Background="Transparent" BorderBrush="{x:Null}" BorderThickness="0">
                            <ToggleButton.Style>
                                <Style TargetType="ToggleButton">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Grid Background="Transparent">
                                                    <Grid>
                                                        <Ellipse HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="{StaticResource graphLegendBackground}" StrokeThickness="1">
                                                            <Ellipse.Style>
                                                                <Style TargetType="Ellipse">
                                                                    <Style.Triggers>
                                                                        <DataTrigger Binding="{Binding IsVisible}" Value="True">
                                                                            <Setter Property="Stroke" Value="{Binding Stroke}"></Setter>
                                                                        </DataTrigger>
                                                                        <DataTrigger Binding="{Binding IsVisible}" Value="False">
                                                                            <Setter Property="Stroke" Value="Transparent"></Setter>
                                                                        </DataTrigger>
                                                                    </Style.Triggers>
                                                                </Style>
                                                            </Ellipse.Style>
                                                        </Ellipse>
                                                        <TextBlock FontSize="8" Text="{Binding Name}" VerticalAlignment="Center" Foreground="Black" FontWeight="DemiBold" HorizontalAlignment="Center"></TextBlock>
                                                    </Grid>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ToggleButton.Style>
                        </ToggleButton>
                    </Grid>
                </Border>
            </DataTemplate>
            <!--Graph Legend Template-->


            <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>
            <!--Extensions-->

        </ResourceDictionary>

    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>