Пример #1
0
        public Form1()
        {
            InitializeComponent();

            _ribbonContextMenuStrip = new RibbonContextMenuStrip(_ribbon, (uint)RibbonMarkupCommands.cmdContextMap);

            // recommended way
            panel2.MouseClick += new MouseEventHandler(panel2_MouseClick);

            // convenient way
            panel1.ContextMenuStrip = _ribbonContextMenuStrip;
        }
Пример #2
0
        public Form1()
        {
            InitializeComponent();

            _ribbonContextMenuStrip = new RibbonContextMenuStrip(_ribbon, (uint)RibbonMarkupCommands.cmdContextMap);

            // recommended way
            panel2.MouseClick += new MouseEventHandler(panel2_MouseClick);

            // convenient way
            panel1.ContextMenuStrip = _ribbonContextMenuStrip;
        }