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
<!-- Tema do Editor de Clips (portado do Adams Clips). Só se aplica dentro do editor:
estilos implícitos de ComboBox/Slider/TextBox/ScrollBar/TextBlock ficam confinados
a esta árvore visual e não tocam no resto do Toolkit. -->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- tipografia -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource BrText}"/>
<Setter Property="FontFamily" Value="Segoe UI Variable Text, Segoe UI"/>
</Style>
<Style x:Key="Label" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="FontSize" Value="12"/>
<Setter Property="Foreground" Value="{DynamicResource BrMuted}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="Muted" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="FontSize" Value="11"/>
<Setter Property="Foreground" Value="{DynamicResource BrMuted}"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<!-- botões -->
<Style x:Key="BtnPrimary" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource BrAccentGradient}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="16,9"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="B" Background="{TemplateBinding Background}" CornerRadius="9" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"><Setter TargetName="B" Property="Opacity" Value="0.88"/></Trigger>
<Trigger Property="IsEnabled" Value="False"><Setter TargetName="B" Property="Opacity" Value="0.4"/></Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BtnGhost" TargetType="Button" BasedOn="{StaticResource BtnPrimary}">
<Setter Property="Background" Value="{DynamicResource BrCardHover}"/>
<Setter Property="Foreground" Value="{DynamicResource BrText}"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Padding" Value="12,7"/>
</Style>
<Style x:Key="BtnDanger" TargetType="Button" BasedOn="{StaticResource BtnPrimary}">
<Setter Property="Background" Value="#7F1D1D"/>
</Style>
<!-- switch -->
<Style x:Key="Switch" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Foreground" Value="{DynamicResource BrText}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<StackPanel Orientation="Horizontal">
<Border x:Name="Track" Width="38" Height="20" CornerRadius="10" Background="{DynamicResource BrBorder}" VerticalAlignment="Center">
<Ellipse x:Name="Knob" Width="14" Height="14" Fill="White" HorizontalAlignment="Left" Margin="3,0,0,0"/>
</Border>
<ContentPresenter Margin="10,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Track" Property="Background" Value="{DynamicResource BrAccent}"/>
<Setter TargetName="Knob" Property="HorizontalAlignment" Value="Right"/>
<Setter TargetName="Knob" Property="Margin" Value="0,0,3,0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- segmented (modo de captura) -->
<Style x:Key="Seg" TargetType="RadioButton">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Foreground" Value="{DynamicResource BrMuted}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="B" Background="{DynamicResource BrSurface}" BorderBrush="{DynamicResource BrBorder}" BorderThickness="1" CornerRadius="8" Padding="14,7" Margin="0,0,6,0">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="B" Property="Background" Value="{DynamicResource BrAccentGradient}"/>
<Setter TargetName="B" Property="BorderBrush" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True"><Setter TargetName="B" Property="Opacity" Value="0.85"/></Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- combo escura -->
<Style x:Key="ComboToggle" TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="{DynamicResource BrSurface}" BorderBrush="{DynamicResource BrBorder}" BorderThickness="1" CornerRadius="8">
<Path Data="M0,0 L4,4 L8,0" Stroke="{DynamicResource BrMuted}" StrokeThickness="1.5" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="{DynamicResource BrText}"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="B" Background="Transparent" Padding="{TemplateBinding Padding}">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True"><Setter TargetName="B" Property="Background" Value="{DynamicResource BrCardHover}"/></Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox">
<Setter Property="Foreground" Value="{DynamicResource BrText}"/>
<Setter Property="Height" Value="34"/>
<Setter Property="MinWidth" Value="150"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton Style="{StaticResource ComboToggle}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Focusable="False"/>
<ContentPresenter Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
Margin="10,0,28,0" VerticalAlignment="Center" IsHitTestVisible="False"/>
<Popup x:Name="PART_Popup" IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" AllowsTransparency="True" PopupAnimation="Fade" StaysOpen="False">
<Border Background="{DynamicResource BrCard}" BorderBrush="{DynamicResource BrBorder}" BorderThickness="1" CornerRadius="8"
MinWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}}" MaxHeight="260" Margin="0,4,0,0">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<ItemsPresenter/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- textbox -->
<Style TargetType="TextBox">
<Setter Property="Background" Value="{DynamicResource BrSurface}"/>
<Setter Property="Foreground" Value="{DynamicResource BrText}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BrBorder}"/>
<Setter Property="CaretBrush" Value="{DynamicResource BrAccent}"/>
<Setter Property="Height" Value="34"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="B" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="8" Padding="{TemplateBinding Padding}">
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="True"><Setter TargetName="B" Property="BorderBrush" Value="{DynamicResource BrAccent}"/></Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- slider -->
<Style TargetType="Slider">
<Setter Property="Height" Value="22"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid>
<Border Height="4" CornerRadius="2" Background="{DynamicResource BrBorder}" VerticalAlignment="Center"/>
<Track x:Name="PART_Track" VerticalAlignment="Center">
<Track.DecreaseRepeatButton>
<RepeatButton Command="Slider.DecreaseLarge" IsTabStop="False">
<RepeatButton.Template>
<ControlTemplate TargetType="RepeatButton">
<Border Height="4" CornerRadius="2" Background="{DynamicResource BrAccent}"/>
</ControlTemplate>
</RepeatButton.Template>
</RepeatButton>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="Slider.IncreaseLarge" IsTabStop="False">
<RepeatButton.Template>
<ControlTemplate TargetType="RepeatButton"><Border Background="Transparent" Height="20"/></ControlTemplate>
</RepeatButton.Template>
</RepeatButton>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Width="16" Height="16">
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Ellipse Fill="White" Stroke="{DynamicResource BrAccent}" StrokeThickness="2"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- scrollbar fininha -->
<Style TargetType="ScrollBar">
<Setter Property="Width" Value="6"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Track x:Name="PART_Track" IsDirectionReversed="True">
<Track.Thumb>
<Thumb>
<Thumb.Template>
<ControlTemplate TargetType="Thumb"><Border Background="{DynamicResource BrBorder}" CornerRadius="3"/></ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>