locked
how to disable the zoomin and zoomout of the webview control

    Question

  • HI ,How can i forbid(disable) the zoomin and zoomout function of the webview control,let the webview control can't zoomin and zoomout?please tell me

    Tuesday, May 20, 2014 8:07 AM

Answers

All replies

  • There's nothing built-into WebView that allows this.  You may be able to do it in javascript, but I haven't tested it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, May 20, 2014 1:55 PM
    Moderator
  • thanks for your answer. can your give me some sample javascript code ?

    Wednesday, May 21, 2014 12:46 AM
  • Maybe you can start with knowing how to perform zooming and work backwards:
    http://channel9.msdn.com/Series/Windows-Store-Developer-Solutions/WebView-Magic-Tricks-Series-Part-2-Zooming


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, May 21, 2014 2:12 PM
    Moderator