11<ResourceDictionary xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+ xmlns : wpf =" clr-namespace:MaterialDesignThemes.Wpf"
23 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml" >
34 <ResourceDictionary .MergedDictionaries>
45 <ResourceDictionary Source =" MaterialDesignTheme.ValidationErrorTemplate.xaml" />
1314 </Setter .Value>
1415 </Setter >
1516 </Style >
17+
1618 <Style x : Key =" FocusVisual" >
1719 <Setter Property =" Control.Template" >
1820 <Setter .Value>
2224 </Setter .Value>
2325 </Setter >
2426 </Style >
27+
2528 <Style x : Key =" MaterialDesignRadioButton" TargetType =" {x:Type RadioButton}" >
2629 <Setter Property =" FocusVisualStyle" Value =" {StaticResource FocusVisual}" />
2730 <Setter Property =" BorderThickness" Value =" 1" />
214217 </Setter >
215218 </Style >
216219
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 >
217264</ResourceDictionary >
0 commit comments