![]() |
Custom context menu possible? - Printable Version +- Antwise community forums (https://forums.antwise.com) +-- Forum: Antview (https://forums.antwise.com/forumdisplay.php?fid=11) +--- Forum: Antview for Windows (https://forums.antwise.com/forumdisplay.php?fid=12) +--- Thread: Custom context menu possible? (/showthread.php?tid=228) |
Custom context menu possible? - jkirstaetter - 2025-10-06 Hello Wil, Is it currently possible to define and use one's own context menu using AntView 2? I see only https://doc.antwise.com/antview2/hs44.htm to disable the context menu but no references to WebView 2 ContextMenuRequested event. https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.contextmenurequested Is this eventually on your roadmap? Cheers, JoKi RE: Custom context menu possible? - wila - 2025-10-06 Hi Jochen, As you already found out, this is currently not available. From the looks of it, it isn't just a matter of exposing this one event, there's a whole slew of interfaces that have to be added in order for this to be useful, see for example this one: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2contextmenuitem That doesn't mean it isn't possible. Let me have a look at it for a bit to see what can be done. PS: if this feature is going to be implemented, it will be added to AntView version 2.x -- Wil RE: Custom context menu possible? - jkirstaetter - 2025-10-06 Hello Wil, I'm not asking for the control to allow me to create my own context menu using the types provided by the control. If the event would be available so that I can intercept it to mark it as handled and then provide my own context menu would be great. Accessing the args parameter would be sufficient already. args.ContextMenuTarget.Kind args.Handled This would allow me to provide context-specific context menu in my application. Cheers, JoKi |