-
We use Fluent.Ribbon now for some time and are happy with it, but now we got a requirement to show a notification element on the button (for now only a red dot, but it could become a counter or something the like). First we create the buttons "by hand", like this:
Normally I would use something like this:
But as long as the button is not initialized inside the window, the VisualTree does not exist and the AdornerLayer does not exist, either. Has anyone a good idea of how to put the adorner there without waiting for the window to have initialized first and then walking the VisualTree down till I find the correct button to put my Adorner on? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I also had to solve this kind of issue, getting adorners to show on any element. You can either use an attached property that, when set to true, subscribes to the loaded and unloaded event of the control the property was used on and show/hide the adorner when the element gets loaded. Or you could use a behavior that takes care of that. The way with the most control is a combination of both. |
Beta Was this translation helpful? Give feedback.
-
Ok, I found my solution...
Just have to add the AdornerDecorator to the group and the button as child of the decorator. This way it works fine. |
Beta Was this translation helpful? Give feedback.
Ok, I found my solution...
If I create a AdornerDecorator and put the Button inside and THEN try to get the AdornerLayer I can manipulate it: