/// <summary>
/// 禁用嵌套页面的右键菜单
/// </summary>
public class MenuHandler : IContextMenuHandler
{
public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
{
model.Clear();
}
public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
{
return false;
}
public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
{
}
public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
{
return false;
}
}
相关文章
- 01-04WinForm的TextBox限制只能输入数字并且屏蔽默认右键菜单
- 01-04wpf 删除系统自带右键菜单
- 01-04TC4.3 右键菜单
- 01-04禁止和允许显示任务栏的右键菜单
- 01-04Qt右键菜单
- 01-04Qt——右键菜单
- 01-04CWnd::OnContextMenu函数(右键单击弹出快捷菜单)
- 01-04QT使用右键菜单QMenu
- 01-04eclipse工具的全解(右键new菜单自定义、常用快捷键)
- 01-04将 notepad++ 添加到鼠标右键菜单 带图标