internal void FireNavigationProgress(NavigationProgressEventArgs e) { OnNavigationProgress(e); }
protected virtual void OnNavigationProgress (NavigationProgressEventArgs args) { if (NavigationProgress != null) NavigationProgress (this, args); }
/// <summary> /// This method fires the NavigationProgress event /// each time number of bytes equal to bytesInterval is read /// </summary> /// <remarks> /// This method follows the .Net programming guideline of having a protected virtual /// method that raises an event, to provide a convenience for developers that subclass /// the event. If you override this method - you need to call Base.OnNavigationProgress(...) for /// the corresponding event to be raised. /// </remarks> /// <param name="e">NavigationEventArgs</param> protected virtual void OnNavigationProgress(NavigationProgressEventArgs e) { VerifyAccess(); if (NavigationProgress != null) { NavigationProgress(this, e); } }
private void Application_NavigationProgress(object sender, NavigationProgressEventArgs e) { System.Console.WriteLine("Application_Navigated, Uri: {0}, BytesRead: {1}", e.Uri.ToString(), e.BytesRead); }
private void FireNavigationProgress(Uri source) { // Fire accessibility event for Frame, NavigationWindow, etc. UIElement navigatorHost = INavigatorHost as UIElement; if (navigatorHost != null) { AutomationPeer peer = UIElementAutomationPeer.FromElement(navigatorHost) as AutomationPeer; if (peer != null) { NavigationWindowAutomationPeer.RaiseAsyncContentLoadedEvent(peer, BytesRead, MaxBytes); } } NavigationProgressEventArgs e = new NavigationProgressEventArgs(source, BytesRead, MaxBytes, INavigatorHost); // Event handler exception continuality: if exception occurs in NavigationProgress event handler, the cleanup action is // the same as StopLoading(). try { if (_navigationProgress != null) { _navigationProgress(INavigatorHost, e); } if (this.Application != null && this.Application.CheckAccess()) { this.Application.FireNavigationProgress(e); } } catch { DoStopLoading(true, false); throw; } }
void PART_Frame_NavigationProgress(object sender, NavigationProgressEventArgs e) { if (NavigationProgress != null) NavigationProgress(this, e); }
private void Application_NavigationProgress(object sender, System.Windows.Navigation.NavigationProgressEventArgs e) { logger.InfoFormat("{0:D3}.{1}", ++numberIndex, MethodBase.GetCurrentMethod().Name); }