fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.48k stars 515 forks source link

LauncherIcon not rendered correctly and items in QAT can be removed from QAT in it's popup #1185

Closed nkrs200 closed 5 months ago

nkrs200 commented 6 months ago

Hello,

It appears to me that when I am using the latest version of Fluent.Ribbon, it somehow uses the wrong icons for the launcher icons. image In the image above, the correct launcher icon (the default launcher icon) is displayed when the launcher icon variable is not set, but if it is set (like it is in the paragraph group), it would use the icon that is defined.

Also, I have noticed that when a ribbon group is added into the quick access, it doesn't open automatically as you have to click the edge of the box surrounding the icon (if there is one), and then from there, if that ribbongroup is shown, the ribbon group disappears from the ribbon. image Image above is hovering over the image on the ribbon. image When the edge of the button is clicked. image Somehow found another bug where the launcher icon disappears if you add it from the "Add to Quick Access Toolbar" command when the popup menu is shown. Not sure how it became empty. image And... there it goes after opening and closing it a few times...

Also here is a few videos that shows exactly everything that I did. Media3.zip

Attached is a zip of the project file that I used below. RibbonTests.zip

Just for a little side note: The RibbonGroupBox item in the Quick Access Toolbar issue is also in as far back as Fluent.Ribbon 8.0.0.

I hope this helps!


Environment:

batzen commented 6 months ago

Hi there,

your launcher icons don't render properly because you seem to have something wrong in your rendering code for those. That's not a bug in Fluent.Ribbon.

Having to click the edge of the group in the QAT is caused by the icon being hittest visible. I will change the IconPresenter to not be visible for hit testing in the next version. You can also fix it for your icons by setting IsHitTestVisible to false while waiting for the next version.

The disappearing launcher icon is caused by a bug in Fluent.Ribbon as visual can only have one parent control. The QAT works by moving/cloning controls to the QAT popup. As your launcher icon is a visual that one only renders in the popup, but disappears from the real control. I will fix this by using a visual brush if the launcher icon is a visual. That's the way the icon get's cloned also. In case of your icons that leads to the icon not being rendered in the popup as using your control as a visual brush does not seem to work.

The disappearing group items issue is also a bug in Fluent.Ribbon an will be fixed in the next version.