Custom Tooltips & tooltip interactivity

Bars for WPF Forum

Posted 2 months ago by Alex
Version: 24.1.3
Avatar

I have two problems with tooltips for Bars elements

1. I would love to have rich content in those tooltips, including images. I realized I can override the content by setting ToolTip property, but I need a way to set the tooltip width so that the image will not be cut if it is too wide. The best option would be to have all of that controllable via dependency properties, and with MVVM support too. But at least please tell me how to adjust the tooltip width to my liking.

2. I would also love to have interactive elements (most obviously a "Show Help"/"Details" hyperlink) in those tooltip popups. I realize that the entire tooltip popup is excluded from hit tests. Can this feature be implemented in a neat way?

Comments (2)

Answer - Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

For the image width issue, what about using a Viewbox to surround the image?  Then you can set a MaxWidth on it to ensure it remains scaled under a maximum size.

Also if you are using ScreenTip instead of ToolTip, there is a ComplexContentWidth property that can be set to a larger value.  It comes into place with complex screen tip layouts to keep them a consistent width.  Whereas if you use regular ToolTip, there is no restriction on size and the first suggestion with a Viewbox and MaxWidth might be best.

Tooltips show and hide based on where the mouse moves.  Unfortunately that's out of our control, so I'm not sure you can put interactive elements on them.  That being said, we have seen places in Office in the past where Microsoft would show a help icon at the bottom of the ToolTip and say "Press F1 for Help" next to it.  Then they would watch for the F1 key to be pressed and provide contextual assistance.

[Modified 2 months ago]


Actipro Software Support

Posted 2 months ago by Alex
Avatar

Thanks! ScreenTips are exactly what I was looking for. Just couldn't find them because I was searching "tooltips" instead.

The latest build of this product (v24.1.4) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.