I am implementing a Webkit Browser control in my windows app.
I need to use a custom context menu (right click) that only has copy/cut/paste as its options regardless of what element is right clicked. I need kind of a step-by-step as to how to implement it
Customizing the context menu for the
WebKitBrowsersupposes that you get a reference to theWebViewClassand then, setting aIWebUIDelegatefor it by calling thesetUIDelegate()method.In the
IWebUIDelegateimplementation you may intercept thecontextMenuItemsForElementmethod and trigger the display of the context menu of the browser.Here is a working sample:
For more insight, probably you would want to study some other customizations, such as open-webkit-sharp.