Exemplo n.º 1
0
        private void OnBeforeContextMenu(IntPtr self, IntPtr browser, IntPtr frame, IntPtr @params, IntPtr model)
        {
            var e = new ContextMenuOpeningEventArgs {
                Browser = Browser.FromHandle(browser),
                Frame = Frame.FromHandle(frame),
                Arguments = ContextMenuArgs.FromHandle(@params),
                Menu = ContextMenu.FromHandle(model)
            };

            _browserDelegate.OnContextMenuOpening(e);
            e.Arguments.Dispose();
            e.Menu.Dispose();
        }
Exemplo n.º 2
0
 protected internal virtual void OnContextMenuOpening(ContextMenuOpeningEventArgs e)
 {
     var handler = ContextMenuOpening;
     if (handler != null) {
         handler(this, e);
     }
 }
Exemplo n.º 3
0
 protected override void OnContextMenuOpening(ContextMenuOpeningEventArgs e)
 {
     e.Menu.Items.Clear();
     e.Menu.Items.Add(new LabelMenuItem("Navigate to Google") {Command = 26500});
     base.OnContextMenuOpening(e);
 }