protected override void OnShowContextMenu(ContextMenuEventArgs e) { var menu = new ContextMenu { Items = { new MenuItem { Header = "Back", Command = new DelegateCommand(GoBack, CanGoBack) }, new MenuItem { Header = "Forward", Command = new DelegateCommand(GoForward, CanGoForward) }, new MenuItem { Header = "Refresh", Command = new DelegateCommand(() => Reload(true)) }, new Separator(), new MenuItem { Header = "Select All", Command = new DelegateCommand(SelectAll) }, new MenuItem { Header = "Open Page In Default Browser", Command = new DelegateCommand <Uri>(WindowsHelper.ViewInBrowser), CommandParameter = e.Info.PageURL }, } }; if (e.Info.HasSelection) { menu.Items.InsertRange <Control>(0, new MenuItem { Header = "Copy", Command = new DelegateCommand(Copy), }, new Separator()); } if (e.Info.HasLinkURL) { menu.Items.InsertRange <Control>(0, new MenuItem { Header = "Open Link", Command = new DelegateCommand <Uri>(u => { Navigate(u.ToString()); }), CommandParameter = e.Info.LinkURL }, new MenuItem { Header = "Open Link In Default Browser", Command = new DelegateCommand <Uri>(WindowsHelper.ViewInBrowser), CommandParameter = e.Info.LinkURL }, new MenuItem { Header = "Copy Link Address", Command = new DelegateCommand(CopyLinkAddress), }, new Separator()); } menu.IsOpen = true; e.Handled = true; }
private void Renderer_OnShowContextMenu(object sender, Awesomium.Core.ContextMenuEventArgs e) { }
void Html5_ShowContextMenu(object sender, Awesomium.Core.ContextMenuEventArgs e) { e.Handled = true; }