I have some radiobuttons in an app that works with touch.
Because the end-user can have thick fingers, I want to make the circle and text int he radiobutton bigger.
Problem is, I can only make the text bigger, not the circle in the radiobutton.
<RadioButton VerticalAlignment="Center" x:Name="rbtnContainers" Click="SetContainers" FontSize="18">Containers</RadioButton>
Using height doesn't work either. It makes the radiobutton bigger, but the circle remains the same.
Any hint or answer is appreciated.
This should work for you.
<Viewbox Height="40">
<RadioButton></RadioButton>
</Viewbox>
another alternative is to write your own ControlTemplate for the RadioButton and change its appearance as you want.
A more of a hack would be to try to simply transform the object with something like...
<RadioButton.RenderTransform>
<CompositeTransform ScaleX="5" ScaleY="5"/>
</RadioButton.RenderTransform>
Just remember that ScaleX and ScaleY needs to be equal, otherwise the object will look stretched awkwardly
According to my own experimenting, the rendering of this is not at all messed up (e.g. no alignment issues, etc.)
To resize only the circle, one can use RadioButton template and change Width and Height of BulletChrome.
<ControlTemplate TargetType="RadioButton" x:Key="CustomRadioButtonStyle"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
<BulletDecorator Background="#00FFFFFF">
<BulletDecorator.Bullet>
<mwt:BulletChrome Height="25" Width="25" Background="{TemplateBinding Panel.Background}" BorderBrush="{TemplateBinding Border.BorderBrush}" RenderMouseOver="{TemplateBinding UIElement.IsMouseOver}" RenderPressed="{TemplateBinding ButtonBase.IsPressed}" IsChecked="{TemplateBinding ToggleButton.IsChecked}" IsRound="True" />
</BulletDecorator.Bullet>
<ContentPresenter RecognizesAccessKey="True" Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" Margin="{TemplateBinding Control.Padding}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" />
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="ContentControl.HasContent">
<Setter Property="FrameworkElement.FocusVisualStyle">
<Setter.Value>
<Style TargetType="IFrameworkInputElement">
<Style.Resources>
<ResourceDictionary />
</Style.Resources>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" Margin="14,0,0,0" SnapsToDevicePixels="True" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Control.Padding">
<Setter.Value>
<Thickness>4,0,0,0</Thickness>
</Setter.Value>
</Setter>
<Trigger.Value>
<s:Boolean>True</s:Boolean>
</Trigger.Value>
</Trigger>
<Trigger Property="UIElement.IsEnabled">
<Setter Property="TextElement.Foreground">
<Setter.Value>
<DynamicResource ResourceKey="{x:Static SystemColors.GrayTextBrushKey}" />
</Setter.Value>
</Setter>
<Trigger.Value>
<s:Boolean>False</s:Boolean>
</Trigger.Value>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
After hours trying things I finally found a rather simple solution to increase the size of the button, without increasing the associated label.
In the document outline, right-click the radio control, Edit Template > Edit a copy
Give it a name and decide if you want to store it as an App (global) style or local (current window) style.
In the generated xaml code, edit the values minWidth, minHeight of the field Ellipse from the section below
Apply that style to your RadioButton
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="radioButtonBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="100" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,2,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid x:Name="markGrid" Margin="2">
<!-- HERE change minWidth/minHeight for the dimensions of the button -->
<Ellipse x:Name="optionMark" Fill="{StaticResource RadioButton.Static.Glyph}" MinWidth="20" MinHeight="20" Opacity="0"/>
</Grid>
</Border>
<ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
Related
In my WPF project I have this ComboBox style:
<Style x:Key="ComboBoxTextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Grid>
<Border CornerRadius="5,0,0,5"
Background="{TemplateBinding Background}"
>
<ScrollViewer x:Name="PART_ContentHost"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="comboboxitem" TargetType="ComboBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border CornerRadius="3" Height="30" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" >
<Setter.Value>
<SolidColorBrush Color="{DynamicResource BackgroundColour}"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="combobox" TargetType="{x:Type ComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition MaxWidth="18"/>
</Grid.ColumnDefinitions>
<TextBox Background="{TemplateBinding Background}" Name="PART_EditableTextBox" IsReadOnly="{TemplateBinding IsReadOnly}" FontSize="{TemplateBinding FontSize}" Style="{StaticResource ComboBoxTextBoxStyle}" Foreground="White" VerticalAlignment="Center" Height="{TemplateBinding Height}"/>
<ToggleButton Grid.Column="1" Background="{TemplateBinding Background}" Margin="0" Height="{TemplateBinding Height}" Focusable="False" Foreground="White" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">
<ToggleButton.Template>
<ControlTemplate>
<Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="0 5 5 0">
<Border.Background>
<SolidColorBrush Color="{TemplateBinding Background}"/>
</Border.Background>
<Path Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="#DF464B" />
</Border>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ContentPresenter Name="ContentSite"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="5,0,0,0"/>
<Popup Name="Popup"
Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True"
Focusable="False"
PopupAnimation="Slide">
<Grid Name="DropDown"
SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border
x:Name="DropDownBorder"
BorderThickness="1"
CornerRadius="0 0 5 5"
Background="{TemplateBinding Background}"
BorderBrush="#DF464B"/>
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained">
</StackPanel>
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
But on the arrow dropdown part (styled as a border) I try and set the Background property to bind to the template's property using <SolidColorBrush Color="{TemplateBinding Background}"/> but it won't work. I'm guessing it has something to do with the fact that it is trying to get the Background from the actual border instead of when I am calling the Combobox like this:<Combobox Style="combobox" Background="DesiredBackground"/>. How can I make it so that it binds to the correct Background?
You should bind the Border's Background property, not the Color, to ComboBox Background property.
It works with "TemplateBinding" as well, but then you are binding to the ToggleButton and not to the ComboBox. But since the ToggleButton is getting its Background from ComboBox it will work anyway.
<Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="0 5 5 0"
Background="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType=ComboBox}}">
I'm using the WPF Toolkit for a project that I need an Accordion control. The control initially works fine (there is a known design bug but otherwise no problem), but anyone who tried the control knows that weird blue background that comes with it. I want to change the default background for the control and I go to Expression Blend, right click an AccordionItem instance, and go to Edit Template -> Edit a Copy. I select to apply it all app-wise, and it creates a new template (which should be identical to the original). The control looks exactly the same, but anything inside an AccordionItem gets invisible. No errors, no warnings. They just get invisible. When I click their tag in XAML, I can see they are selected, just as if they are behind something, but they aren't! When I delete the (never-touched) control template from the App.xaml, it gets back to normal, but I'm back again with the blue background. Here is the untouched XAML template created by Blend:
<Style TargetType="{x:Type System_Windows_Controls:AccordionItem}">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#FFECECEC"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type System_Windows_Controls:AccordionItem}">
<Grid Background="Blue" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Padding="{TemplateBinding Padding}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="cd0" Width="Auto"/>
<ColumnDefinition x:Name="cd1" Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="rd0" Height="Auto"/>
<RowDefinition x:Name="rd1" Height="Auto"/>
</Grid.RowDefinitions>
<System_Windows_Controls_Primitives:AccordionButton x:Name="ExpanderButton" Background="{TemplateBinding Background}" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="True" IsChecked="{TemplateBinding IsSelected}" Margin="0" Padding="0" Grid.Row="0" Style="{TemplateBinding AccordionButtonStyle}" VerticalAlignment="{TemplateBinding VerticalAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<System_Windows_Controls_Primitives:ExpandableContentControl x:Name="ExpandSite" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="0" Percentage="0" RevealMode="{TemplateBinding ExpandDirection}" Grid.Row="1" Style="{TemplateBinding ExpandableContentControlStyle}" VerticalAlignment="{TemplateBinding VerticalAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
<System_Windows_Controls_Primitives:ExpandableContentControl.Clip>
<RectangleGeometry/>
</System_Windows_Controls_Primitives:ExpandableContentControl.Clip>
</System_Windows_Controls_Primitives:ExpandableContentControl>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Am I missing something? I am not super used to templates and styles, but anything from "Edit a copy", in an untouched state, should act identical to the default template, but it doesn't. I can safely delete the setters other than the Template, and it won't change. There is something with the Template setter, which makes the AccordionItem act abnormally.
You just delete string Background="Blue" this property is of the Grid which is first child of Control Template.
this must be very simple but it's monday morning.. I have a label and overridden the template with a border. when I set statusLabel.Content to null I expect the label to become non-visible but instead the label's border still is. how do I get rid of the border just when statusLabel.Content is null? below is the associated xaml:
<StackPanel Orientation="Horizontal">
<Image Name="statusImage"
Stretch="None"
VerticalAlignment="Top"
Margin="20, 20, 0, 0"/>
<Label Name="statusLabel"
Margin="20, 20, 0, 0"
VerticalAlignment="Top"
Background="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:StatusLayer}, Path=StatusTextBackground}"
FontSize ="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:StatusLayer}, Path=FontSize}"
FontStyle="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:StatusLayer}, Path=FontStyle}"
FontWeight="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:StatusLayer}, Path=FontWeight}"
Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:StatusLayer}, Path=StatusTextForeground}"
FontFamily="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:StatusLayer}, Path=FontFamily}" >
<Label.Template>
<ControlTemplate TargetType="{x:Type Label}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" CornerRadius="5">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Label.Template>
</Label>
</StackPanel>
UPDATE: thanks for the code in your answers, it showed me that my previous attempts to get the border to disappear failed because the trigger I tested with earlier (not listed in my question code) checked on Value="null" instead of Value="{x:Null}"... DOH! using the correct trigger with setting the visibility on the Label works perfectly.
In the Border and the ContentPresenter:
Visibility="{TemplateBinding Visibility}"
Does it solve the problem?
I doubt it does, but trying can't hurt :p
Otherwise, you need to add a DataTrigger bound to the Content property of the label, and when it is null, set the visibility of the label to Collapsed or Hidden.
Since the inner control's visibility is now bound to the visibility of the label, everything should disappear.
Off the top of my head, completely untested:
<Label.Template>
<ControlTemplate TargetType="{x:Type Label}">
<Border Name="LabelBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" CornerRadius="5">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="Content" Value="{x:Null}">
<Setter ElementName="LabelBorder" Property="Visibility" Value="Hidden"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Label.Template>
I'm trying to animate a user control (in WPF) using it's visibility as a trigger. I'm not sure what I'm doing wrong, but it doesn't seem to do anything DX (forgive me, I'm new to this).
This is what I have in my MainWindow.xaml:
<local:toolbarDiscPlayback x:Name="Main_toolbarDisc" Grid.Row="2" Visibility="Collapsed" Style="{DynamicResource toolbarStyle}"/>
And in my code behind, I have a click event that changes the visibility of the user control:
Main_toolbarDisc.Visibility = Visibility.Visible;
Which works all well and good, however it's not animating like I (hope I) tell it to in my resource dictionary:
<Style x:Key="toolbarStyle" TargetType="{x:Type VALR:toolbarDiscPlayback}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type VALR:toolbarDiscPlayback}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True" RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TransformGroup>
<TranslateTransform Y="0"/>
</TransformGroup>
</Border.RenderTransform>
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Visibility" Value="Visible">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard >
<DoubleAnimation
Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
From="150" To="0"
DecelerationRatio="0.5"
Duration="00:00:01.000"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
</Style.Triggers>
</Style>
As you'll note, I've only done this for the animate-in or 'become visible' so far. I'm pretty positive I'm just doing something silly, or not doing it the right way.
That is because your RenderTransform is configured for the Border and not for your actual local:toolbarDiscPlayback
This change should suffice...
<Style x:Key="toolbarStyle"
TargetType="{x:Type VALR:toolbarDiscPlayback}">
<Setter Property="RenderTransform">
<Setter.Value>
<TranslateTransform/>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="{x:Type VALR:toolbarDiscPlayback}">
<Border BorderBrush="{TemplateBinding BorderBrush}"
... >
<ContentPresenter .... />
</Border>
</ControlTemplate>
<Setter.Value>
</Setter>
<Style.Triggers>
...
</Style.Triggers>
</Style>
All windows in Aero have this kind of whiteish background on their text. I'd like to create an equivalent of this effect for a GlassWindow I'm using that has a TextBlock in the label area, but I'm not really a designer so I have no idea how to approach this. How can I reproduce this background effect?
This could lead you in the right direction: Glowing Label Controls On A Glass Surface
EDIT: Modified the original sample (linked) and added color tot the blur
<Style TargetType="{x:Type Label}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Label}">
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<Grid>
<ContentPresenter
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<ContentPresenter.ContentTemplate>
<DataTemplate>
<TextBlock Foreground="White" Text="{TemplateBinding Content}" />
</DataTemplate>
</ContentPresenter.ContentTemplate>
<ContentPresenter.Effect>
<BlurEffect Radius="10" />
</ContentPresenter.Effect>
</ContentPresenter>
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>