I am re-asking a similar question that has been asked. The answers didn't seem to work in my particular case. I have included details.
I have a ComboBox and within the ComboBox each item has a ToggleButton. When I click on the ToggleButton there is a red outline that I want to get rid of. How can I remove the red outline around the button? In the ControlTemplate I am setting BorderThickness=”0”, BorderBrush=”Transparent”, Focusable=”false”. These were all things that other posts had mentioned.
<!--Xaml for ComboBox: -->
<TimestampComboBox
Style="{DynamicResource PlotComboBoxStyle}"
IsSynchronizedWithCurrentItem="True"
…
>
<TimestampComboBox.ItemsSource >…
</TimestampComboBox.ItemsSource>
<TimestampComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<DockPanel Width="174" LastChildFill="False">
<ToggleButton DockPanel.Dock=
Style="{DynamicResource SampleAddToggleButtonStyle}"
>
<ToggleButton.Content>
<Rectangle Height="10" Width="10"/>
</ToggleButton.Content>
</ToggleButton>
</DockPanel>
</StackPanel>
</DataTemplate>
</TimestampComboBox.ItemTemplate>
</TimestampComboBox>
<!--SampleAddToggleButtonStyle: -->
<Style x:Key="SampleAddToggleButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Name="border" BorderThickness="0" BorderBrush="Transparent">
<ContentPresenter Content="{TemplateBinding Content}" />
</Border>
<ControlTemplate.Triggers>
…
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>