How to display an 'unread messages' overlay icon on a Ribbon Button

Ribbon for WPF Forum

Posted 5 years ago by John Brown
Version: 18.1.0675
Avatar

Hi,

On a smartphone, when you have unread messages or emails, you get a small indicator (a number in a circle, for example) on the app's icon telling you how many unread messages you have.

Is it possible to do the same sort of thing with a Ribbon Button ?

I looked in the documentation for a relevant control or property but could not find anything.  I have also tried a few quick-and-dirty options using UserControls that embed the Ribbon Button, but they don't work all that well (for example, the ribbon button tends to display the small icon instead of the large one), so I was wondering if you have any information about how to do it...


Thanks in advance.

Comments (2)

Answer - Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi John,

Ribbon buttons don't have an overlay mechanism built in.  That being said, they show the image you pass in and you can update the image however you like.  For instance in our main Ribbon demo's RichTextBoxExtended class, there is a UpdateApplyDefaultForegroundSmallImageSource method that takes a PNG image, adds it to a DrawingImage, and overlays a GeometryDrawing on top of the PNG portion.  That effectively allows an overlay, in this case, to show the foreground color.  Perhaps you could do something similar but add a circle overlay instead.


Actipro Software Support

Posted 5 years ago by John Brown
Avatar

Thanks for that.  I'll have a look at that demo and see what it does.

I've also been looking into adorners and behaviors and stuff, so I'll see which approach works best in our situation.

The latest build of this product (v24.1.1) 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.