fix: unify RadioButton & CheckBox themes of ListBox.
(cherry picked from commit 4b53300909d00a09e3c6a63d6742d8c284218de3)
This commit is contained in:
parent
f1836b0892
commit
782749f0dc
@ -16,7 +16,7 @@
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
||||
<Setter Property="ListBox.Template">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBox">
|
||||
<Border
|
||||
Name="border"
|
||||
@ -95,13 +95,13 @@
|
||||
|
||||
<!-- RadioGroup -->
|
||||
<ControlTheme x:Key="RadioGroupListBox" TargetType="ListBox">
|
||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource RadioGroupListBoxItem}" />
|
||||
<Setter Property="ListBox.ItemsPanel">
|
||||
<Setter Property="ItemContainerTheme" Value="{DynamicResource RadioGroupListBoxItem}" />
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
<Setter Property="ListBox.Template">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBox">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
@ -117,28 +117,28 @@
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="RadioGroupListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="ListBoxItem.HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="ListBoxItem.VerticalAlignment" Value="Top" />
|
||||
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
|
||||
<Setter Property="ListBoxItem.HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
|
||||
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupBoxCornerRadius}" />
|
||||
<Setter Property="ListBoxItem.Foreground" Value="{DynamicResource ListBoxItemRadioGroupForeground}" />
|
||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupDefaultBackground}" />
|
||||
<Setter Property="ListBoxItem.BorderBrush" Value="{DynamicResource ListBoxItemRadioGroupDefaultBorderBrush}" />
|
||||
<Setter Property="ListBoxItem.Template">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ListBoxItemRadioGroupDefaultBorderBrush}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupBoxCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border
|
||||
Name="RootBorder"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="{DynamicResource ListBoxItemRadioGroupIconMargin}"
|
||||
<Panel
|
||||
Grid.Column="0"
|
||||
TemplatedControl.IsTemplateFocusTarget="True"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<Ellipse
|
||||
Name="OuterEllipse"
|
||||
@ -154,23 +154,22 @@
|
||||
Width="{DynamicResource ListBoxItemRadioGroupGlyphRadius}"
|
||||
Height="{DynamicResource ListBoxItemRadioGroupGlyphRadius}"
|
||||
Fill="{DynamicResource ListBoxItemRadioGroupCheckGlyphFill}"
|
||||
Opacity="0"
|
||||
Stroke="{DynamicResource ListBoxItemRadioGroupCheckGlyphFill}"
|
||||
StrokeThickness="0"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
|
||||
</Panel>
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="{DynamicResource ListBoxItemRadioGroupContentMargin}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextElement.FontSize="{DynamicResource ListBoxItemRadioGroupFontSize}"
|
||||
TextElement.Foreground="{DynamicResource ListBoxItemRadioGroupForeground}" />
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@ -190,13 +189,9 @@
|
||||
<!-- Unchecked Pointerover State -->
|
||||
<Style Selector="^:pointerover">
|
||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||
<Setter Property="Stroke"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBorderBrush}" />
|
||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Unchecked Pressed State -->
|
||||
@ -205,9 +200,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Unchecked Disabled state -->
|
||||
@ -216,9 +208,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
||||
</Style>
|
||||
@ -242,9 +231,6 @@
|
||||
<Setter Property="Fill"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Checked Pressed State -->
|
||||
@ -254,9 +240,6 @@
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Checked Disabled State -->
|
||||
@ -266,9 +249,6 @@
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
||||
</Style>
|
||||
@ -280,19 +260,18 @@
|
||||
<ControlTheme x:Key="ButtonRadioGroupListBox"
|
||||
BasedOn="{StaticResource RadioGroupListBox}"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource ButtonRadioGroupListBoxItem}" />
|
||||
<Setter Property="ItemContainerTheme" Value="{DynamicResource ButtonRadioGroupListBoxItem}" />
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="ButtonRadioGroupListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupButtonCornerRadius}" />
|
||||
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="ListBoxItem.Margin" Value="2" />
|
||||
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
|
||||
<Setter Property="ListBoxItem.FontWeight" Value="{DynamicResource ListBoxItemRadioGroupButtonFontWeight}" />
|
||||
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultFontSize}" />
|
||||
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultPadding}" />
|
||||
<Setter Property="ListBoxItem.Foreground"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedForeground}" />
|
||||
<Setter Property="ListBoxItem.Template">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultPadding}" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource ListBoxItemRadioGroupButtonFontWeight}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultFontSize}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedForeground}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupButtonCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
@ -312,7 +291,7 @@
|
||||
UseLayoutRounding="False" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Setter Property="ListBoxItem.Background" Value="Transparent" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Background"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedPointeroverBackground}" />
|
||||
@ -345,24 +324,21 @@
|
||||
<ControlTheme x:Key="CardRadioGroupListBox"
|
||||
BasedOn="{StaticResource RadioGroupListBox}"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CardRadioGroupListBoxItem}" />
|
||||
<Setter Property="ItemContainerTheme" Value="{DynamicResource CardRadioGroupListBoxItem}" />
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="CardRadioGroupListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
|
||||
<Setter Property="ListBoxItem.BorderThickness" Value="1" />
|
||||
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
|
||||
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
|
||||
<Setter Property="ListBoxItem.HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="ListBoxItem.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="ListBoxItem.HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
|
||||
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border
|
||||
Name="RootBorder"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
@ -372,7 +348,10 @@
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="{DynamicResource ListBoxItemRadioGroupIconMargin}" VerticalAlignment="Top">
|
||||
<Panel
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Top"
|
||||
Margin="{DynamicResource ListBoxItemRadioGroupIconMargin}">
|
||||
<Ellipse
|
||||
Name="OuterEllipse"
|
||||
Width="{DynamicResource ListBoxItemRadioGroupIconRadius}"
|
||||
@ -387,22 +366,23 @@
|
||||
Width="{DynamicResource ListBoxItemRadioGroupGlyphRadius}"
|
||||
Height="{DynamicResource ListBoxItemRadioGroupGlyphRadius}"
|
||||
Fill="{DynamicResource ListBoxItemRadioGroupCheckGlyphFill}"
|
||||
Opacity="0"
|
||||
Stroke="{DynamicResource ListBoxItemRadioGroupCheckGlyphFill}"
|
||||
StrokeThickness="0"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
</Panel>
|
||||
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="{DynamicResource ListBoxItemRadioGroupContentMargin}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
RecognizesAccessKey="True"
|
||||
TextElement.FontSize="{DynamicResource ListBoxItemRadioGroupFontSize}"
|
||||
TextElement.Foreground="{DynamicResource ListBoxItemRadioGroupForeground}" />
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
@ -425,9 +405,6 @@
|
||||
<Setter Property="Stroke"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Unchecked Pressed State -->
|
||||
@ -437,9 +414,6 @@
|
||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Unchecked Disabled state -->
|
||||
@ -448,9 +422,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
||||
</Style>
|
||||
@ -486,9 +457,6 @@
|
||||
<Setter Property="Fill"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Checked Pressed State -->
|
||||
@ -500,9 +468,6 @@
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Checked Disabled State -->
|
||||
@ -512,9 +477,6 @@
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#RootBorder">
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
||||
@ -531,24 +493,25 @@
|
||||
<ControlTheme x:Key="PureCardRadioGroupListBox"
|
||||
BasedOn="{StaticResource RadioGroupListBox}"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource PureCardRadioGroupListBoxItem}" />
|
||||
<Setter Property="ItemContainerTheme" Value="{DynamicResource PureCardRadioGroupListBoxItem}" />
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="PureCardRadioGroupListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
|
||||
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
|
||||
<Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="ListBoxItem.BorderThickness" Value="1" />
|
||||
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
|
||||
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
|
||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
|
||||
<Setter Property="ListBoxItem.Template">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
@ -556,10 +519,11 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="False" />
|
||||
UseLayoutRounding="False"
|
||||
TextWrapping="Wrap" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Setter Property="ListBoxItem.BorderBrush"
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBorderBrush}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Background"
|
||||
@ -603,21 +567,19 @@
|
||||
<ControlTheme x:Key="CheckGroupListBox"
|
||||
BasedOn="{StaticResource RadioGroupListBox}"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CheckGroupListBoxItem}" />
|
||||
<Setter Property="ItemContainerTheme" Value="{DynamicResource CheckGroupListBoxItem}" />
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="CheckGroupListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="Padding" Value="8,0,0,0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemCheckFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCheckBoxCornerRadius}" />
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemCheckForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ListBoxItemCheckDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ListBoxItemCheckDefaultBorderBrush}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCheckBoxCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border
|
||||
@ -626,11 +588,11 @@
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid Name="RootGrid" ColumnDefinitions="Auto,*">
|
||||
<Grid
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<Panel
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
VerticalAlignment="Center">
|
||||
TemplatedControl.IsTemplateFocusTarget="True"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<Border
|
||||
Name="NormalRectangle"
|
||||
Width="{DynamicResource ListBoxItemCheckBoxWidth}"
|
||||
@ -645,16 +607,17 @@
|
||||
Width="{DynamicResource ListBoxItemCheckBoxGlyphWidth}"
|
||||
Height="{DynamicResource ListBoxItemCheckBoxGlyphHeight}"
|
||||
Foreground="{DynamicResource ListBoxItemCheckGlyphFill}" />
|
||||
</Grid>
|
||||
</Panel>
|
||||
<ContentPresenter
|
||||
Name="ContentPresenter"
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Margin="{DynamicResource ListBoxItemCheckBoxContentMargin}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
@ -680,7 +643,7 @@
|
||||
|
||||
<!-- Unchecked Disabled state -->
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemCheckDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@ -720,7 +683,7 @@
|
||||
|
||||
<!-- Checked Disabled State -->
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemCheckDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@ -765,7 +728,7 @@
|
||||
|
||||
<!-- Checked Disabled State -->
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemCheckDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@ -784,16 +747,18 @@
|
||||
<ControlTheme x:Key="CardCheckGroupListBox"
|
||||
BasedOn="{StaticResource RadioGroupListBox}"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CardCheckGroupListBoxItem}" />
|
||||
<Setter Property="ItemContainerTheme" Value="{DynamicResource CardCheckGroupListBoxItem}" />
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="CardCheckGroupListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource ListBoxItemCheckCardPadding}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource ListBoxItemCheckCardBorderThickness}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCheckCardCornerRadius}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="ListBoxItem.Template">
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource ListBoxItemCheckCardBorderThickness}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border
|
||||
Name="RootBorder"
|
||||
@ -803,11 +768,13 @@
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
Name="RootGrid"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
ColumnDefinitions="Auto,*">
|
||||
<Grid Grid.Column="0" VerticalAlignment="Top">
|
||||
<Panel
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Top"
|
||||
Margin="{DynamicResource ListBoxItemCheckBoxIconMargin}">
|
||||
<Border
|
||||
Name="NormalRectangle"
|
||||
Width="{DynamicResource ListBoxItemCheckBoxWidth}"
|
||||
@ -822,17 +789,19 @@
|
||||
Width="{DynamicResource ListBoxItemCheckBoxGlyphWidth}"
|
||||
Height="{DynamicResource ListBoxItemCheckBoxGlyphHeight}"
|
||||
Foreground="{DynamicResource ListBoxItemCheckGlyphFill}" />
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
<ContentPresenter
|
||||
Name="ContentPresenter"
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Margin="{DynamicResource ListBoxItemCheckBoxContentMargin}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
IsVisible="{TemplateBinding Content,
|
||||
Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
|
@ -7,7 +7,8 @@
|
||||
<x:Double x:Key="ListBoxItemRadioGroupIconRadius">16</x:Double>
|
||||
<x:Double x:Key="ListBoxItemRadioGroupGlyphRadius">6</x:Double>
|
||||
<x:Double x:Key="ListBoxItemRadioGroupFontSize">14</x:Double>
|
||||
<Thickness x:Key="ListBoxItemRadioGroupIconMargin">0 2 8 0</Thickness>
|
||||
<Thickness x:Key="ListBoxItemRadioGroupIconMargin">0 2 0 0</Thickness>
|
||||
<Thickness x:Key="ListBoxItemRadioGroupContentMargin">8 0 0 0</Thickness>
|
||||
<CornerRadius x:Key="ListBoxItemRadioGroupBoxCornerRadius">3</CornerRadius>
|
||||
|
||||
<!-- ButtonRadioGroupListBox -->
|
||||
@ -35,12 +36,14 @@
|
||||
|
||||
<CornerRadius x:Key="ListBoxItemCheckBoxCornerRadius">3</CornerRadius>
|
||||
<Thickness x:Key="ListBoxItemCheckBoxBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="ListBoxItemCheckBoxIconMargin">0 2 0 0</Thickness>
|
||||
<Thickness x:Key="ListBoxItemCheckBoxContentMargin">8 0 0 0</Thickness>
|
||||
|
||||
<StreamGeometry x:Key="ListBoxItemCheckCheckGlyph">M17.4111 7.30848C18.0692 7.81171 18.1947 8.75312 17.6915 9.41119L11.1915 17.9112C10.909 18.2806 10.4711 18.4981 10.0061 18.5C9.54105 18.5019 9.10143 18.288 8.81592 17.9209L5.31592 13.4209C4.80731 12.767 4.92512 11.8246 5.57904 11.316C6.23296 10.8074 7.17537 10.9252 7.68398 11.5791L9.98988 14.5438L15.3084 7.58884C15.8116 6.93077 16.7531 6.80525 17.4111 7.30848Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="ListBoxItemCheckIndeterminateGlyph">M5 12.5C5 11.6716 5.67157 11 6.5 11H17.5C18.3284 11 19 11.6716 19 12.5C19 13.3284 18.3284 14 17.5 14H6.5C5.67157 14 5 13.3284 5 12.5Z</StreamGeometry>
|
||||
|
||||
<!-- CardCheckGroupListBox -->
|
||||
<Thickness x:Key="ListBoxItemCheckCardBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="ListBoxItemCheckCardPadding">16</Thickness>
|
||||
<Thickness x:Key="ListBoxItemCheckCardPadding">16 12</Thickness>
|
||||
<CornerRadius x:Key="ListBoxItemCheckCardCornerRadius">3</CornerRadius>
|
||||
</ResourceDictionary>
|
Loading…
x
Reference in New Issue
Block a user