CheckListBox and CheckComboBox have problems with the classic Windows theme when the mouse is over one of the items.
The problem is that the check mark is drawn using the Foreground color in Classic.xaml:
``` XAML
<Style x:Key="{x:Type CheckBox}"
TargetType="{x:Type CheckBox}">
...
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<BulletDecorator ...>
<BulletDecorator.Bullet>
<theme:ClassicBorderDecorator x:Name="CheckMark"
Background="{TemplateBinding Background}" ...>
<Path x:Name="CheckMarkPath"
Margin="1,1,1,1" Width="7" Height="7" FlowDirection="LeftToRight"
Fill="{TemplateBinding Foreground}"
Data="M 0 2.0 L 0 4.8 L 2.5 7.4 L 7.1 2.8 L 7.1 0 L 2.5 4.6 Z"/>
...
```
The default style for the SelectorItem sets the Foreground color to HighlightTextBrushKey (which defaults to white) when the cursor is over, so the check mark is white on white which looks as if the check box is not checked even if you just clicked on it:
```
<Style TargetType="{x:Type primitives:SelectorItem}">
...
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type primitives:SelectorItem}">
...
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="_background" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
</Trigger>
...
```
So highlighted items always look as if they are not checked.
Comments: ** Comment from web user: BoucherS **
The problem is that the check mark is drawn using the Foreground color in Classic.xaml:
``` XAML
<Style x:Key="{x:Type CheckBox}"
TargetType="{x:Type CheckBox}">
...
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<BulletDecorator ...>
<BulletDecorator.Bullet>
<theme:ClassicBorderDecorator x:Name="CheckMark"
Background="{TemplateBinding Background}" ...>
<Path x:Name="CheckMarkPath"
Margin="1,1,1,1" Width="7" Height="7" FlowDirection="LeftToRight"
Fill="{TemplateBinding Foreground}"
Data="M 0 2.0 L 0 4.8 L 2.5 7.4 L 7.1 2.8 L 7.1 0 L 2.5 4.6 Z"/>
...
```
The default style for the SelectorItem sets the Foreground color to HighlightTextBrushKey (which defaults to white) when the cursor is over, so the check mark is white on white which looks as if the check box is not checked even if you just clicked on it:
```
<Style TargetType="{x:Type primitives:SelectorItem}">
...
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type primitives:SelectorItem}">
...
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="_background" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
</Trigger>
...
```
So highlighted items always look as if they are not checked.
Comments: ** Comment from web user: BoucherS **
Hi,
What version of Windows are you using ?
I've try a CheckListBox in Windows 7 with toolkit v2.0 : The Checkmark remains black while the whole highlighted CheckListBox item takes a blue background color when the mouse is Over.
I've try a CheckListBox in Windows 8 with toolkit v2.0 : Same results.