Unplanned
Last Updated: 15 Aug 2017 12:09 by Stevens
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 28 May 2015 12:22
Category: CommandBar
Type: Bug Report
3
FIX. RadCommandBar - CommandBarButton.Click event is fired when clicking with the right and middle button
The issue exists with RadMenuItem as well!

Workaround:

public class CustomCommandBarButton : CommandBarButton
{
    protected override void OnClick(EventArgs e)
    {
        MouseEventArgs args = e as MouseEventArgs;
        if (args.Button == System.Windows.Forms.MouseButtons.Left)
        {
            base.OnClick(e);
        }
    }

    protected override Type ThemeEffectiveType     
    { 
        get    
        { 
            return typeof(CommandBarButton);     
        }
    }
}
3 comments
Stevens
Posted on: 15 Aug 2017 12:09
Yes, workaround is good.
ADMIN
Stefan
Posted on: 15 Aug 2017 11:45
Does the workaround provided work for you?
Stevens
Posted on: 14 Jul 2017 11:02
Got the same problem, both commandbar buttons and menu item.