简体   繁体   中英

How to Disable Context menu of the Web Browser control in WPF?

我有一个显示html本地文档(EPUB文件)的Web浏览器控件,我想关闭右键单击并关闭上下文菜单,使其无法“剪切”和“粘贴”,因为我的Web浏览器处于设计模式...

you can disable default context menu by setting IsWebBrowserContextMenuEnabled attribute of WebBrowser to false, then you can create a context menu programmatically and add it to MenuItems List of the WebBrowser. You can find more information here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM