public Form1() { InitializeComponent(); _ribbonContextMenuStrip = new RibbonContextMenuStrip(_ribbon, (uint)RibbonMarkupCommands.cmdContextMap); // recommended way panel2.MouseClick += new MouseEventHandler(panel2_MouseClick); // convenient way panel1.ContextMenuStrip = _ribbonContextMenuStrip; }