I wrote a small WPF control - a text box that displays an icon (i) that allows you to display tooltips. The relevant part of the management template is as follows:
<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>
InfoIconhave IsTabStopand are Focusableexplicitly set to false. But this does not prevent this control from gaining focus when tabbing through controls:

How can I prevent this part of CustomControl from getting focus?
Spook source
share