views:

95

answers:

1

Hi! Is there any way to virtualize tooltip in WPF? I have many dataitems displayed on map. When i'm changing template, for example, it takes a lot of time to generate UI for tooltips that are invisible. Maybe wpf supports something for such cind of virtualization? Thanks in advance.

+1  A: 

The way in which I've done this before is to generate a tooltip that is very simple, with a container item as the root and a simple single textblock inside, and then hook into the loaded event on the textblock, to detect when the tooltip is trying to be shown.

At that point, I then generate the full tooptip on the fly and replace the contents of the container, removing the textblock placeholder in the process.

Andrew