What is the minimum number of steps required to display a tooltip when the following control gets focus?
<TextBox ToolTip="Hello there!" ... />
I tried the following in GotFocus
private void ..._GotFocus(object sender, RoutedEventArgs e) {
var element = (FrameworkElement)sender;
var tooltip = element.ToolTip;
if (!(tooltip is ToolTip)) {
tooltip = new ToolTip { Content = tooltip };
element.ToolTip = tooltip;
}
((ToolTip)tooltip).IsOpen = true;
}
However, it seems to ignore the ToolTipService.Placement
for this control and SystemParameters.ToolTipPopupAnimationKey
set up level higher.
How can I make it work and honor all settings that generally work for tooltips (except the timing, obviously)?