mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-08-21 13:01:10 +12:00
76 lines
No EOL
4.3 KiB
XML
76 lines
No EOL
4.3 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<Grid
|
|
Name="templateRoot"
|
|
SnapsToDevicePixels="True"
|
|
Background="{DynamicResource CheckboxDefaultOutlineColor}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border
|
|
Name="checkBoxBorder"
|
|
Margin="1"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Background="{DynamicResource CheckboxDefaultBackground}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid Name="markGrid">
|
|
<Path
|
|
Name="optionMark"
|
|
Opacity="0"
|
|
Stretch="None"
|
|
Margin="1"
|
|
Data="F1 M9.97498,1.22334 L4.6983,9.09834 L4.52164,9.09834 L0,5.19331 L1.27664,3.52165 L4.255,6.08833 L8.33331,1.52588E-05 L9.97498,1.22334"
|
|
Fill="{DynamicResource CheckboxTickColor}" />
|
|
<Rectangle
|
|
Name="indeterminateMark"
|
|
Margin="2"
|
|
Opacity="0"
|
|
Fill="{DynamicResource CheckboxTickColor}" />
|
|
</Grid>
|
|
</Border>
|
|
<ContentPresenter
|
|
Name="contentPresenter"
|
|
RecognizesAccessKey="True"
|
|
Grid.Column="1"
|
|
Margin="{TemplateBinding Padding}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="False" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxHoveredBackground}" />
|
|
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource CheckboxHoveredTickColor}" />
|
|
<Setter TargetName="indeterminateMark" Property="Fill" Value="{DynamicResource CheckboxHoveredTickColor}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxDisabledBackground}" />
|
|
<Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{DynamicResource CheckboxDisabledOutlineColor}" />
|
|
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource CheckboxDisabledTickColor}" />
|
|
<Setter TargetName="indeterminateMark" Property="Fill" Value="{DynamicResource CheckboxDisabledTickColor}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxPressedBackground}"/>
|
|
</Trigger>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
|
<Setter TargetName="optionMark" Property="UIElement.Opacity" Value="1" />
|
|
<Setter TargetName="indeterminateMark" Property="UIElement.Opacity" Value="0" />
|
|
</Trigger>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="{x:Null}">
|
|
<Setter TargetName="optionMark" Property="UIElement.Opacity" Value="0" />
|
|
<Setter TargetName="indeterminateMark" Property="UIElement.Opacity" Value="1" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |