开发者

Tooltip adorner

I am using a third party charting library (Infragistics xamChart). I am not satisfied with how tooltips are displayed on a line charts datapoints so I was thinking of using an adorner to make a better looking/interactive tooltip.

What I want to do is have the adorner popup whenever one of the datapoints is hovered over. Does anyone have any pointers on how I can do thi开发者_Go百科s? Most of the adorner samples I found are pretty simple ones that just alter the entire control they are adorning.

My main questions are:

  • Is it possible for an adorner to appear only when certain elements are hovered over (and have it appear at the current cursor position)?

  • Does anyone have a simple sample they can share?

  • Are adorners the right way to go here? I think the only other option was to use the popup control but I though adorners were a nicer solution.

Thank you.


Perhaps Attached Behaviours could help you? From this article:

The idea is that you set an attached property on an element so that you can gain access to the element from the class that exposes the attached property. Once that class has access to the element, it can hook events on it.

That way you could attach a listener to the MouseEnter event and display your custom ToolTip from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜