Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# browser zoom

I am building a C# application and using the web browser from the visual studio toolkit.. is it possible to enable this browser to do pinch zoom etc when browsing large images/pdf's for use on a tablet?

like image 718
Gabriel Gould Avatar asked Nov 27 '12 14:11

Gabriel Gould


1 Answers

You can do this by setting body zoom atribute:

private void Form1_Load(object sender, EventArgs e)
        {
            webBrowser1.Navigate("http://google.com");
        }
    private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
    {
        webBrowser1.Document.Body.Style = "zoom:300%;";
    }
like image 181
KF2 Avatar answered Sep 22 '22 04:09

KF2