private void WvLogin_Navigating(object sender, WebNavigatingEventArgs e) { if (e.Url.Contains("https://xamarin-oidc-sample/redirect")) { wvLogin.IsVisible = false; // parse response _authResponse = new AuthorizeResponse(e.Url); // CSRF check var state = _authResponse.Values["state"]; if (state != _currentCSRFToken) { txtResult.Text = "CSRF token doesn't match"; return; } string decodedTokens = ""; // decode tokens if (!string.IsNullOrWhiteSpace(_authResponse.IdentityToken)) { decodedTokens += "Identity token \r\n"; decodedTokens += DecodeToken(_authResponse.IdentityToken) + "\r\n"; } if (!string.IsNullOrWhiteSpace(_authResponse.AccessToken)) { decodedTokens += "Access token \r\n"; decodedTokens += DecodeToken(_authResponse.AccessToken); } txtResult.Text = decodedTokens; } }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { string val = e.Url; Console.WriteLine(val); if (val.Contains("https://www.droverrideshare-")) { Console.WriteLine(val); int index = val.IndexOf('-') + 1; int newIndex = val.Length - 5; val = val.Substring(index, (newIndex - index)); Console.WriteLine(val); } }
private void WebViewOnNavigating(object sender, WebNavigatingEventArgs args) { var m = EmaUrlRegex.Match(args.Url); if (m.Success) { args.Cancel = true; var pageName = m.Groups[1].Value; pageName = WebUtility.UrlDecode(pageName); GoTo(pageName); } if (!args.Cancel) { args.Cancel = true; //open external links in external browser _externalBrowserService.OpenUrl(args.Url); } }
void webviewNavigating(System.Object sender, Xamarin.Forms.WebNavigatingEventArgs e) { if (!(e.Url.StartsWith("https://test.nottheonlyone.org"))) { if (!(e.Url.StartsWith("https://platform.twitter.com"))) { try { var uri = new Uri(e.Url); Launcher.OpenAsync(uri); } catch (Exception) { } e.Cancel = true; } } }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { overlay.IsVisible = true; }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { activityIndicator.IsRunning = true; }
public void SendNavigating(WebNavigatingEventArgs args) { Navigating?.Invoke(this, args); }
static void WebView_OnNavigating (object sender, WebNavigatingEventArgs e) { Debug.WriteLine ("OS: " + Device.OS + " Current Url: " + GetSourceUrl (((WebView)sender).Source) + "Destination Url: " + e.Url + " " + DateTime.Now); if (e.Url.IsValidAbsoluteUrl ()) { var destinationUri = new Uri (e.Url); var sourceUri = GetSourceUrl (((WebView)sender).Source); if (sourceUri.HasSameHost (destinationUri)) { if (destinationUri == sourceUri) { //Do nothing. This happens on webview load Debug.WriteLine ("WebView_OnNavigating Same URI"); return; } //If it reaches here, A link could have been clicked. e.Cancel = true; Debug.WriteLine ("WebView_OnNavigating Same Host but different Uri"); } else { //if external link is clicked Debug.WriteLine ("WebView_OnNavigating, DIfferent Uri, so open in Native Browser"); e.Cancel = true; Device.OpenUri (new Uri (e.Url)); } } }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { LoadingLabel.IsVisible = true; }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { }
internal void SendNavigating(WebNavigatingEventArgs args) { EventHandler<WebNavigatingEventArgs> handler = Navigating; if (handler != null) handler(this, args); }
void webOnNavigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { lblStatus.Text = "Loading..."; }
/// <summary> /// Called when the webview starts navigating. Displays the loading label. /// </summary> void webviewNavigating(object sender, WebNavigatingEventArgs e) { this.labelLoading.IsVisible = true; //display the label when navigating starts }
void LoadingSite(object sender, WebNavigatingEventArgs e) { this.Title = "Henter " + type + "..."; //LoadingLabel.IsVisible = true; }
void OnNavigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { WebPageViewModel.IsBusy = true; Task.Run(async() => await Progress.ProgressTo(0.9, 1000, Easing.SpringIn)); }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { refreshButton.IsVisible = false; loadingIndicator.IsVisible = true; loadingIndicator.IsRunning = true; }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { //throw new NotImplementedException(); xActivityIndicator.IsRunning = true; }
void webView_Navigating(System.Object sender, Xamarin.Forms.WebNavigatingEventArgs e) { App.curUrl = e.Url; }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { Title = "Loading....."; }
/// <summary> /// Called when the webview starts navigating. Displays the loading label. /// </summary> void webviewNavigating (object sender, WebNavigatingEventArgs e) { this.labelLoading.IsVisible = true; }
void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e) { progressBar.IsVisible = true; progressBar.IsRunning = true; }