IsEnabledTextBlock.xaml
1 <ResourceDictionary 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 xmlns:controls="using:Microsoft.CmdPal.UI.Controls"> 5 6 <Style x:Key="DefaultIsEnabledTextBlockStyle" TargetType="controls:IsEnabledTextBlock"> 7 <Setter Property="Foreground" Value="{ThemeResource DefaultTextForegroundThemeBrush}" /> 8 <Setter Property="IsTabStop" Value="False" /> 9 <Setter Property="Template"> 10 <Setter.Value> 11 <ControlTemplate TargetType="controls:IsEnabledTextBlock"> 12 <Grid> 13 <TextBlock 14 x:Name="Label" 15 FontFamily="{TemplateBinding FontFamily}" 16 FontSize="{TemplateBinding FontSize}" 17 FontWeight="{TemplateBinding FontWeight}" 18 Foreground="{TemplateBinding Foreground}" 19 Text="{TemplateBinding Text}" 20 TextWrapping="WrapWholeWords" /> 21 <VisualStateManager.VisualStateGroups> 22 <VisualStateGroup x:Name="CommonStates"> 23 <VisualState x:Name="Normal" /> 24 <VisualState x:Name="Disabled"> 25 <VisualState.Setters> 26 <Setter Target="Label.Foreground" Value="{ThemeResource TextFillColorDisabledBrush}" /> 27 </VisualState.Setters> 28 </VisualState> 29 </VisualStateGroup> 30 </VisualStateManager.VisualStateGroups> 31 </Grid> 32 </ControlTemplate> 33 </Setter.Value> 34 </Setter> 35 </Style> 36 <Style 37 x:Key="SecondaryIsEnabledTextBlockStyle" 38 BasedOn="{StaticResource DefaultIsEnabledTextBlockStyle}" 39 TargetType="controls:IsEnabledTextBlock"> 40 <Setter Property="Foreground" Value="{ThemeResource TextFillColorSecondaryBrush}" /> 41 <Setter Property="FontSize" Value="12" /> 42 </Style> 43 </ResourceDictionary>