picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.65k stars 333 forks source link

WebView context menu selective lock menu items #1918

Open LaineZ opened 3 years ago

LaineZ commented 3 years ago

Is it possible to lock some context menu entries in WebView like "Refresh" or "View source"?

I highlighted elements which should be deleted xJHLpoy99Q

Specifications

cwensley commented 3 years ago

This really depends on the platform and which WebViewHandler you are using. For example, if you use WebView2 or the standard IE based control on winforms or wpf, the menu will be completely different. Ideally you should have some javascript to specify the context menu for the page, and you should be able to use BrowserContextMenuEnabled property to disable the menu altogether, which should work on all platforms.

Hope this helps!