manoj mishra

manoj mishra

  • 1.5k
  • 249
  • 1.2k

Xamarin Webview help needed

Apr 16 2020 12:58 PM
Hi,
I need a help, actually i am a new learner of xamarin. from last 10 days i was searching for this issue but haven't find correct solution.
I want to open a newtab reportviewer in webview on click Navigating

private void webviewNavigating(object sender, WebNavigatingEventArgs e)
        {
            if (e.Url.Contains(".pdf"))
            {
                // Retrieving the URL 
                var pdfUrl = new Uri(e.Url);

                // Open PDF URL with device browser to download 
                Device.OpenUri(new Uri(e.Url));

                // Cancel the navigation on click actions  
                // (retains in the same page.) 
                e.Cancel = true;
            }
        }
    }
}


it is not working kinldy help me.

Answers (5)