mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
checkbox default style
This commit is contained in:
@@ -10,41 +10,6 @@
|
||||
Title="Project Editor"
|
||||
Background="{DynamicResource PrimaryBackgroundBrush}">
|
||||
<Page.Resources>
|
||||
<Style TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Background" Value="{DynamicResource TertiaryBackgroundBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" >
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" Width="15" Height="15">
|
||||
<Grid>
|
||||
<Grid Background="{TemplateBinding Foreground}" Margin="1" Visibility="Collapsed" Name="nullBlock"/>
|
||||
<Path Stretch="Uniform" Width="15" Height="10" Fill="{TemplateBinding Foreground}" Name="eliCheck" Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z " Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource PrimaryForegroundBrush}" Text="{TemplateBinding Content}"></TextBlock>
|
||||
</StackPanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryBorderBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryForegroundBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="eliCheck" Property="Visibility" Value="Visible"></Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter TargetName="nullBlock" Property="Visibility" Value="Visible"></Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<DataTemplate x:Key="headerTemplate">
|
||||
<Border>
|
||||
<TextBlock
|
||||
|
||||
Reference in New Issue
Block a user