Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
How to change icon image for Minimize the ribbon
posted

Hi ,

How to change the icon for "minimize the ribbon" option in the ribbon  and ribbon right click context menu

Parents
No Data
Reply
  • 300
    Offline posted

    Hello,

    The attached sample contains a simple context menu, which replaces the default one. It also has “Minimize the Ribbon” button replaced with an image in it as you required.

    To change the icon for "Minimize the Ribbon" option, you need to implement the IUIElementDrawFilter interface on an object and set the DrawFilter property of the control to that object. It has two methods GetPhasesToFilter and DrawElement. GetPhaseToFilter is used to designate which UIElement you wish to filter and what the drawing operation should be in the case of the sample this element is RibbonContentAreaPinButtonUIElement , which is the “Minimize the Ribbon” icon, and the drawing operation is BeforedDrawElement. The change of the icon is done with the DrawElement method, which replaces the “Minimize the Ribbon” icon with another image. This method returns a Boolean, if False is returned then the default drawing for that phase will be performed. If True is returned then the default drawing for that phase will be skipped.

    In order to change the context menu of the ribbon you need to handle the BeforeToolbarListDropdown event of the ultraToolbarsManager, with it you can cancel the default context menu and add a custom one that suits the needs of your ribbon or a specific tool in it. After that for each menu item you need to create an event for its functionality.

    Please let me know if you need further assistance.

    Regards, Ivan Kitanov

    ChangingMinimizeIconAndContextMenu.zip

Children
No Data