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
105
Customize Keyboard shortcut from the ribbon customization dialog
posted

In a Windows Form Application, with ribbon, is it possible to customize the keyboard shortcut, defined for a tool, from the ribbon customization dialog, using UltraRibbonCustomizationProvider? Is the only way, call UltraToolbarsManager.Customize ?
Thanks

  • 1700
    Offline posted

    Hello Stefano, 

    Yes, you can customize the keyboard shortcut of a tool using the UltraRibbonCustomizationProvider, but the built-in Ribbon Customization dialog does not expose an option for editing keyboard shortcuts directly. The only way to modify keyboard shortcuts programmatically at runtime is to use the UltraToolbarsManager.Customize method.

    This method programmatically allows you to modify keyboard. Example of changing a shortcut for a specific tool: 

    var tool = ultraToolbarsManager1.Tools["YourToolKey"] as ButtonTool;

    if (tool != null)

    {

     tool.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftA;

    }

     

    Please let me know if you need any further assistance. 

    Regards,
    Ivan Kitanov