How can I change the colour of the arrows to denote sub-menus on Ribbon Menus?
There doesn't seem to be an Appearance for the arrows in in MenuSettings.
I hooked into the DrawElement for ArrowUIElement. This allows me to change the colour of enabled arrows by setting ForeColor, but setting ForeColorDisabled has no effect on the disabled arrows.
What am I missing?
Brilliant, thank you. No idea how I missed that!!
Hello Campbell,
Thank you for your update on this matter. I am glad that the IconAreaAppearance was what you were looking for.
Regarding the location of the ArrowUIElement, this appears to be due to this line in the DrawFilter:
drawParams.Element.Rect = new Rectangle(new Point(drawParams.Element.Rect.X, 16), arrowSize);
I would recommend changing this to be:
drawParams.Element.Rect = new Rectangle(new Point(drawParams.Element.Rect.X, drawParams.Element.Rect.Y), arrowSize);
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thanks for getting back to me. However, I'm having a little difficulty with your example. I've adapted it slightly, because I'm trying to colour the arrows on the disabled items in the dropdown, like so:
However, the ArrowUIElement code seems to return a relative location for its Rect, and therefore when we attempt to draw this, it appears on the wrong menu item:
I can't seem to figure out how to find the correct place to draw this.
And regarding IconAreaAppearance, thank you, that was exactly what I was looking for!
I have been investigating into your inquiries in this case, and I would like you to take a look at the sample project I am attaching.
Regarding the drop-down arrow color, I looked into our support case history, and this had been asked before, with the solution being to utilize a DrawFilter, which from your original update, sounds like you were already doing. Rather than using the ForeColor though, the DrawFilter I found essentially drew its own drop-down arrow as this is a rather simple shape, and this should allow you to modify the color both in an enabled and disabled state.
Regarding the question relating to the “IsSideStripVisible” property – there are really essentially two “side” areas on the PopupMenuTool. The first one to the left of the actual menu area is the “Icon Area” and then comes the “Side Strip” if you set IsSideStripVisible to true. You can modify the icon area by setting the various properties on the PopupMenuTool.Settings.IconAreaAppearance.
I am attaching the sample project mentioned above. I hope this helps you.
UltraToolbarsManagerDownArrowDemo.zip
And whilst we're on the topic of menus, why does setting MenuSettings.IsSideStripVisible add an additional band on the menu, rather than allowing us to change the colour of the band underneath any tool icons? This results in two margins on the left, which IMHO looks a bit daft: