I created a FlatCombo Style that I want to apply to a combo box. The one thing that does not work the way that I want is when the ComboBox has focus. I want almost no indication that it has focus. Currently there is a blue highlight on the text area. I assume this is being picked up from my 3rd party resource dictionary. How do I adjust my local style so all it shows on focus is a light dashed line?
Thanks,
Dave
<UserControl.Resources>
<Style x:Key="MyFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="-1" StrokeThickness="1" Stroke="Black" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="FlatCombo" TargetType="{x:Type ComboBox}">
<ContentControl
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Margin="0,0,0,0" Focusable="True"
/>
</ControlTemplate>
<Style TargetType="{x:Type ComboBox}" x:Key="DropDown">
<Setter Property="OverridesDefaultStyle" Value="False" />
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="IsFocused" Value="False"/>
</MultiTrigger.Conditions>
<Setter Property="Template" Value="{StaticResource FlatCombo}" />
</MultiTrigger>
</Style.Triggers>
</Style>
<ComboBox IsSynchronizedWithCurrentItem="True" x:Name="ComboBoxMinute" Width="Auto"
Height="Auto" HorizontalAlignment="Center"
Background="{Binding Path=Background, ElementName=TextBlockDate, Mode=Default}"
BorderBrush="{x:Null}" FontFamily="{Binding Path=FontFamily,
ElementName=TextBlockDate, Mode=Default}"
FontSize="{Binding Path=FontSize, ElementName=TextBlockDate, Mode=Default}"
Foreground="{Binding Path=Foreground, ElementName=TextBlockDate, Mode=Default}"
Padding="0,0,0,0" MaxDropDownHeight="200" Style="{StaticResource DropDown}" VerticalContentAlignment="Stretch"
VerticalAlignment="Center" FocusVisualStyle="{DynamicResource MyFocusVisual}"/>