/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/common/Common.UI.Controls/Controls/IsEnabledTextBlock/IsEnabledTextBlock.xaml
48 строк
2 KB
Niels Laute
Creating a Common.UI.Controls lib (#45542)
12 фев 2026, 18:45
Не верифицирован
12 фев 2026, 18:45
75bf642
Код
Авторство
О чём код?
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="using:Microsoft.PowerToys.Common.UI.Controls"> <Style BasedOn="{StaticResource DefaultIsEnabledTextBlockStyle}" TargetType="controls:IsEnabledTextBlock" /> <Style x:Key="DefaultIsEnabledTextBlockStyle" TargetType="controls:IsEnabledTextBlock"> <Setter Property="Foreground" Value="{ThemeResource DefaultTextForegroundThemeBrush}" /> <Setter Property="IsTabStop" Value="False" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="controls:IsEnabledTextBlock"> <Grid> <TextBlock x:Name="Label" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" IsTextSelectionEnabled="{TemplateBinding IsTextSelectionEnabled}" Text="{TemplateBinding Text}" TextWrapping="WrapWholeWords" /> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> <VisualState x:Name="Disabled"> <VisualState.Setters> <Setter Target="Label.Foreground" Value="{ThemeResource TextFillColorDisabledBrush}" /> </VisualState.Setters> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="SecondaryIsEnabledTextBlockStyle" BasedOn="{StaticResource DefaultIsEnabledTextBlockStyle}" TargetType="controls:IsEnabledTextBlock"> <Setter Property="Foreground" Value="{ThemeResource TextFillColorSecondaryBrush}" /> <Setter Property="FontSize" Value="12" /> </Style> </ResourceDictionary>