本文整理汇总了C#中System.Windows.Navigation.NavigatingCancelEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# NavigatingCancelEventArgs类的具体用法?C# NavigatingCancelEventArgs怎么用?C# NavigatingCancelEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigatingCancelEventArgs类属于System.Windows.Navigation命名空间,在下文中一共展示了NavigatingCancelEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (geoQ.IsBusy == true)
{
geoQ.CancelAsync();
}
}
示例2: frame_Navigating
private void frame_Navigating(object sender, NavigatingCancelEventArgs e)
{
if (this.IsBusy)
{
this.IsBusy = false;
}
}
示例3: OnNavigating
private void OnNavigating(object sender, NavigatingCancelEventArgs args)
{
_lastMode = args.NavigationMode;
var handler = Navigating;
if (handler != null)
handler(this, new NavigatingCancelEventArgsWrapper(args));
}
示例4: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
// Das Suchen nach Peers beenden
PeerFinder.Stop();
base.OnNavigatingFrom(e);
}
示例5: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
Browser.Navigating -= this.Browser_Navigating;
Browser.NavigationFailed -= this.Browser_NavigationFailed;
base.OnNavigatingFrom(e);
}
示例6: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
var viewModel = DataContext as INavigationAware;
if (viewModel != null)
viewModel.OnNavigatingFrom(new NavigatingCancelContext(e.IsCancelable, (NavigationMode)e.NavigationMode, () => e.Cancel, (cancel) => e.Cancel = cancel));
}
示例7: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (State.ContainsKey(FocusedElement))
{
State.Remove(FocusedElement);
}
var focusedElement = FocusManager.GetFocusedElement() as Control;
if (focusedElement == null) return;
if (!String.IsNullOrEmpty(focusedElement.Name))
{
State.Add(FocusedElement, focusedElement.Name);
}
BindingExpression be = null;
//TODO - Developers, add additional controls here like a date picker, combobox, etc.
if (focusedElement is TextBox)
{
be = focusedElement.GetBindingExpression(TextBox.TextProperty);
}
if (be != null)
{
be.UpdateSource();
}
base.OnNavigatingFrom(e);
}
示例8: browser_Navigating
void browser_Navigating(object sender, NavigatingCancelEventArgs e)
{
LastUri = e.Uri;
var uri = e.Uri.ToString();
// If the configuration has an SuccessUri configured,
// we check if we should close this window or not incase
// the browser is arrived on the success page.
if (!string.IsNullOrEmpty(builder.SuccessUri))
{
if (configuration.DisplayName == "Yammer" || configuration.DisplayName == "Facebook")
{
if (uri.Contains(builder.SuccessUri))
{
Success = true;
e.Cancel = true;
Close();
}
}
else
{
if (uri.StartsWith(builder.SuccessUri))
{
Success = true;
e.Cancel = true;
Close();
}
}
}
addressTextBox.Text = uri;
loading.Visibility = Visibility.Visible;
((Storyboard)FindResource("RunLoaderStoryboard")).Begin();
}
示例9: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (_camera == null) return;
// Dispose camera to minimize power consumption and to expedite shutdown.
_camera.Dispose();
}
示例10: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (this.scanTimer != null)
{
this.scanTimer.Stop();
this.scanTimer.Tick -= this.OnTimerTick;
this.scanTimer = null;
}
if (this.phoneCamera != null)
{
this.phoneCamera.CancelFocus();
this.phoneCamera.Initialized -= this.OnCameraInitialized;
this.phoneCamera.Dispose();
}
if (this.barcodeReader != null)
{
this.barcodeReader.ResultFound -= this.OnBarcodeResultFound;
this.barcodeReader = null;
}
if (!this.scanSucceeded && e.NavigationMode == NavigationMode.Back)
{
this.BarcodeScannerPlugin.OnScanFailed("Cancelled by user");
}
}
示例11: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
//clean the view model
ViewModel.Cleanup();
base.OnNavigatingFrom(e);
}
示例12: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
webBrowser.Navigating -= webBrowser_Navigating;
_locationManager.OnPositionDetermined -= _locationManager_OnPositionDetermined;
_locationManager = null;
base.OnNavigatingFrom(e);
}
示例13: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (e.NavigationMode != NavigationMode.Back)
{
ViewModel.Tombstone();
}
}
示例14: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (!alreadyEned)
{
EndTest();
}
}
示例15: BrowserNavigating
private void BrowserNavigating(object sender, NavigatingCancelEventArgs e)
{
if (!e.Uri.ToString().StartsWith(RedirectUri, StringComparison.OrdinalIgnoreCase))
{
// we need to ignore all navigation that isn't to the redirect uri.
return;
}
try
{
OAuth2Response result = DropboxOAuth2Helper.ParseTokenFragment(e.Uri);
if (result.State != this.oauth2State)
{
return;
}
this.AccessToken = result.AccessToken;
this.Uid = result.Uid;
this.Result = true;
}
catch (ArgumentException)
{
// There was an error in the URI passed to ParseTokenFragment
}
finally
{
e.Cancel = true;
this.Close();
}
}