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
470
Prevent raising ToolClick events?
posted

I have a StateButton which I set manually through steButton.Checked = true. Is there a way I can prevent the ToolbarManagerRibbon_ToolClick event or determine when it was sent through a "real" click?

  • 23930
    Offline posted

    Hello Henrik,

    I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.

    Thank you for using Infragistics Components.

  • 23930
    Verified Answer
    Offline posted

    Hi Henrik,

    Thank you for posting in our forums.

    The easiest approach here would be to use the EventManager of the UltraToolbarsManager in order to disable the ToolClick event while changing the value. You can do this with the help of the SetEnabled method:

                try

                {

                    ultraToolbarsManager1.EventManager.SetEnabled(ToolbarEventIds.ToolClick, false);

                    stateButton.Checked = true;

                }

                finally

                {

                    ultraToolbarsManager1.EventManager.SetEnabled(ToolbarEventIds.ToolClick, true);

                }
    Please let me know if you have any additional questions.