1
1
<ResourceDictionary xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
+ xmlns : wpf =" clr-namespace:MaterialDesignThemes.Wpf"
2
3
xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml" >
3
4
<ResourceDictionary .MergedDictionaries>
4
5
<ResourceDictionary Source =" MaterialDesignTheme.ValidationErrorTemplate.xaml" />
13
14
</Setter .Value>
14
15
</Setter >
15
16
</Style >
17
+
16
18
<Style x : Key =" FocusVisual" >
17
19
<Setter Property =" Control.Template" >
18
20
<Setter .Value>
22
24
</Setter .Value>
23
25
</Setter >
24
26
</Style >
27
+
25
28
<Style x : Key =" MaterialDesignRadioButton" TargetType =" {x:Type RadioButton}" >
26
29
<Setter Property =" FocusVisualStyle" Value =" {StaticResource FocusVisual}" />
27
30
<Setter Property =" BorderThickness" Value =" 1" />
214
217
</Setter >
215
218
</Style >
216
219
220
+ <Style x : Key =" MaterialDesignTabRadioButton" TargetType =" {x:Type RadioButton}" >
221
+ <Setter Property =" FocusVisualStyle" Value =" {StaticResource MaterialDesignFocusVisual}" />
222
+ <Setter Property =" Foreground" Value =" {Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
223
+ <Setter Property =" Background" Value =" Transparent" />
224
+ <Setter Property =" BorderBrush" Value =" {DynamicResource SecondaryAccentBrush}" />
225
+ <Setter Property =" Padding" Value =" 16 4 16 4" />
226
+ <Setter Property =" Height" Value =" 32" />
227
+ <Setter Property =" MinWidth" Value =" 80" />
228
+ <Setter Property =" wpf:RippleAssist.Feedback" Value =" {DynamicResource MaterialDesignFlatButtonRipple}" />
229
+ <Setter Property =" TextBlock.FontWeight" Value =" Medium" />
230
+ <Setter Property =" TextBlock.FontSize" Value =" 14" />
231
+ <Setter Property =" HorizontalContentAlignment" Value =" Center" />
232
+ <Setter Property =" VerticalContentAlignment" Value =" Center" />
233
+ <Setter Property =" Template" >
234
+ <Setter .Value>
235
+ <ControlTemplate TargetType =" {x:Type RadioButton}" >
236
+ <Grid SnapsToDevicePixels =" true" >
237
+ <Grid .RowDefinitions>
238
+ <RowDefinition Height =" *" />
239
+ <RowDefinition Height =" Auto" />
240
+ </Grid .RowDefinitions>
241
+ <Border Background =" {TemplateBinding Background}" >
242
+ <wpf : Ripple Content =" {TemplateBinding Content}" ContentTemplate =" {TemplateBinding ContentTemplate}" Focusable =" False"
243
+ HorizontalContentAlignment =" {TemplateBinding HorizontalContentAlignment}"
244
+ VerticalContentAlignment =" {TemplateBinding VerticalContentAlignment}"
245
+ Padding =" {TemplateBinding Padding}"
246
+ x : Name =" contentPresenter"
247
+ Opacity =" .82"
248
+ SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}" />
249
+ </Border >
250
+ <Border x : Name =" SelectionHighlightBorder" Background =" {TemplateBinding BorderBrush}" Height =" 2"
251
+ Grid.Row=" 1"
252
+ Visibility =" Hidden" />
253
+ </Grid >
254
+ <ControlTemplate .Triggers>
255
+ <Trigger Property =" IsChecked" Value =" True" >
256
+ <Setter TargetName =" contentPresenter" Property =" Opacity" Value =" 1" />
257
+ <Setter TargetName =" SelectionHighlightBorder" Property =" Visibility" Value =" Visible" />
258
+ </Trigger >
259
+ </ControlTemplate .Triggers>
260
+ </ControlTemplate >
261
+ </Setter .Value>
262
+ </Setter >
263
+ </Style >
217
264
</ResourceDictionary >
0 commit comments