SharpContextMenu called twice

Mar 20, 2014 at 9:16 PM
Hi All,

I came across a very strange behavior of SharpContextMenu.

Constructor and CanShowMenu method are being called twice when I do mouse right button click on the directory tree in Windows 7 (left side panel of the windows explorer).

In the result it generates context menu twice.

Is this a bug?

Regards,
Mar 20, 2014 at 9:19 PM
Sample code:
[ComVisible(true)]
[COMServerAssociation(AssociationType.Class, @"Directory\Background")]
public class DirectoryContextMenu : SharpContextMenu
{
    public DirectoryContextMenu()
    {
    }

    protected override bool CanShowMenu()
    {
        MessageBox.Show("Show");

        return false;
    }


    protected override System.Windows.Forms.ContextMenuStrip CreateMenu()
    {
        ContextMenuStrip contextMenuStrip = new ContextMenuStrip();

        return contextMenuStrip;
    }
}
Coordinator
Mar 24, 2014 at 9:52 AM
Hi,

I'll look into this for the next release and let you know when I've discovered what's going on :)