有什么方法可以使用Wpf(C#)更改Web浏览器的上下文菜单 [英] Is there any way to change the Context Menu of a Web browser using Wpf (C#)

查看:74
本文介绍了有什么方法可以使用Wpf(C#)更改Web浏览器的上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将更改Web浏览器控件中提供的默认上下文菜单中的菜单项。我已经尝试过:webbrowser.contextmenu = mycontextmenu。
没什么改变。有办法吗?

I would to change the menuitems in the default context menu provided in the Web Browser Control. I have already tried: webbrowser.contextmenu = mycontextmenu. Nothing changed. Is there a way to do this?

推荐答案

答案-是。
webbrowser控件中有一个设置:
.IsWebBrowserContextMenuEnabled = false;

Answer - YES. There is a setting in the webbrowser control for: .IsWebBrowserContextMenuEnabled = false;

将此设置为false会禁用IE上下文菜单,允许任何一个您可以设置根源。简单..

Setting this to false disables the IE contextmenu, allowing whichever one you set to rule the roots. Simples..

这篇关于有什么方法可以使用Wpf(C#)更改Web浏览器的上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆