I wrote a small WPF control - a textbox displaying small (i) icon allowing to display popup help. The relevant part of the control template looks like the following:
<DockPanel>
<local:InfoIcon DockPanel.Dock="Right" Margin="2" VerticalAlignment="Center" HelpContent="{TemplateBinding InfoTooltip}"
Focusable="False" IsTabStop="False"/>
<ScrollViewer x:Name="PART_ContentHost" Margin="2" VerticalAlignment="Center"/>
</DockPanel>
The InfoIcon
have IsTabStop
and Focusable
explicitly set to false. But that doesn't prevent that control from getting focus while tabbing through controls:
How can I prevent this part of CustomControl from getting focus?