-
Notifications
You must be signed in to change notification settings - Fork 7
/
Common.xaml
204 lines (186 loc) · 7.77 KB
/
Common.xaml
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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls"
xmlns:metro2="clr-namespace:Grabacr07.Desktop.Metro.Controls;assembly=Desktop.Metro">
<Style x:Key="TabControlStyleKey"
TargetType="{x:Type TabControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Border>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel x:Name="HeaderPanel"
IsItemsHost="True"
Background="{DynamicResource BackgroundBrushKey}" />
<Border x:Name="ContentSize"
Grid.Column="1">
<ContentPresenter x:Name="PART_SelectedContentHost"
ContentSource="SelectedContent"
Width="{Binding ElementName=ContentSize, Path=ActualWidth}"/>
</Border>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type TabItem}">
<Setter Property="OverridesDefaultStyle"
Value="True" />
<Setter Property="Height"
Value="38" />
<Setter Property="Foreground"
Value="{DynamicResource ForegroundBrushKey}" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border x:Name="Border"
Background="{TemplateBinding Background}">
<ContentPresenter x:Name="ContentSite"
ContentSource="Header" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected"
Value="True">
<Setter Property="Background"
Value="{DynamicResource ThemeBrushKey}" />
</Trigger>
<Trigger SourceName="Border"
Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="Transparent" />
<Setter Property="Background"
Value="{DynamicResource ActiveBackgroundBrushKey}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource DefaultTextStyleKey}">
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
</Style>
<Style TargetType="{x:Type Label}">
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
</Style>
<Style x:Key="SettingsHeaderTextStyleKey"
TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource HeaderTextStyleKey}">
<Setter Property="Margin"
Value="0,0,0,10" />
<Setter Property="FontSize"
Value="15" />
</Style>
<Style x:Key="HeaderTextBlockStyleKey"
TargetType="{x:Type TextBlock}">
<Setter Property="Margin"
Value="0,0,0,10" />
<Setter Property="FontSize"
Value="15" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
</Style>
<Style x:Key="ToolsTabViewStyleKey"
TargetType="{x:Type metro:TabView}">
<Setter Property="SelectionMode"
Value="Single" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type metro:TabView}">
<StackPanel Background="{TemplateBinding Background}">
<StackPanel IsItemsHost="True" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Foreground"
Value="{DynamicResource ForegroundBrushKey}" />
<Setter Property="Height"
Value="38" />
<Setter Property="IsSelected"
Value="{Binding IsSelected}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="FocusVisualStyle"
Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="{DynamicResource ActiveBackgroundBrushKey}" />
</Trigger>
<Trigger Property="IsSelected"
Value="True">
<Setter Property="Background"
Value="{DynamicResource ThemeBrushKey}" />
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type metro:ITabItem}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="12" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="12" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1"
Text="{Binding Name}"
FontSize="14"
Foreground="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=Foreground}"
VerticalAlignment="Center"
HorizontalAlignment="Left"
TextTrimming="CharacterEllipsis" />
<metro:Badge Grid.Column="1"
Grid.ColumnSpan="2"
Count="{Binding Badge}"
Margin="0,4,4,0"
HorizontalAlignment="Right"
VerticalAlignment="Top" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Styles/Icons.xaml" />
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Themes/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Themes/Accents/Purple.xaml" />
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Themes/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Themes/Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MetroRadiance;component/Themes/Accents/Orange.xaml" />
<ResourceDictionary Source="pack://application:,,,/Desktop.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/KanColleViewer;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/KanColleViewer;component/Styles/Controls.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>