1
Vote

Tooltips not displaying properly with tabs

description

When using the advanced tooltip on a tabed interface, tooltips on the first tab will not display after tabbing to to the second tab and then tabbing back. Attached is a small silverlight project that demonstrates this behavior.Run the app, hover over the image on the first tab to see a tooltip. Select the second tab, hover on the image to see its tooltip. Select the first tab again and no tooltip displays. Switch back to the second tab and the tooltip there still works, but the first one will not work again until you refresh the page.

file attachments

comments

Brainpsyk wrote Jul 26, 2013 at 12:33 AM

The problem is when the owner of the tooltip gets unloaded, the tooltip gets unregistered. You can see it in the ToolTipService.cs class, in this method:
    private static void FrameworkElementUnloaded(object sender, RoutedEventArgs e)
    {
        UnregisterToolTip((FrameworkElement)sender);
    }
The workaround is to watch the Loaded method of the owner, and reset the tooltip (not viable in all instances, but will work in some cases).