locked
Right click and ContextMenu in WebView RRS feed

  • Question

  • Hello,

    How can  I show a ContextMenu when user right click on a link(identify the right clicked link also) in WebView Control?


    Santana George

    Saturday, August 24, 2013 6:36 PM

Answers

  • Hi Santana,

    RightTapped is the event to handle for displaying context menus, but this feature is only supported by win8 not by win8.1. You could try to inject Javascript to Webview for display the self-definition context menu.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 26, 2013 2:14 AM
    Moderator
  • You will need to do this from the JavaScript. There is no way to intercept the link click from outside of the WebView control.

    --Rob

    Monday, August 26, 2013 2:31 AM
    Moderator

All replies

  • Hi Santana,

    RightTapped is the event to handle for displaying context menus, but this feature is only supported by win8 not by win8.1. You could try to inject Javascript to Webview for display the self-definition context menu.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 26, 2013 2:14 AM
    Moderator
  • You will need to do this from the JavaScript. There is no way to intercept the link click from outside of the WebView control.

    --Rob

    Monday, August 26, 2013 2:31 AM
    Moderator
  • So I need to inject javascript into html string then navigate webview to that string is it but just when I try to navigate to bing/google after inject some javascript it failed to search (when I input a query in text box and press search button beside it)

    Monday, August 26, 2013 2:28 PM