本文整理汇总了C#中System.Windows.Navigation.NavigatingCancelEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# NavigatingCancelEventArgs类的具体用法?C# NavigatingCancelEventArgs怎么用?C# NavigatingCancelEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigatingCancelEventArgs类属于System.Windows.Navigation命名空间,在下文中一共展示了NavigatingCancelEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (geoQ.IsBusy == true)
{
geoQ.CancelAsync();
}
}
开发者ID:riyanpratama,项目名称:MudikApp,代码行数:7,代码来源:GeneralRoutePage.xaml.cs
示例2: frame_Navigating
private void frame_Navigating(object sender, NavigatingCancelEventArgs e)
{
if (this.IsBusy)
{
this.IsBusy = false;
}
}
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:7,代码来源:GlobalIndicator+-+Copy.cs
示例3: OnNavigating
private void OnNavigating(object sender, NavigatingCancelEventArgs args)
{
_lastMode = args.NavigationMode;
var handler = Navigating;
if (handler != null)
handler(this, new NavigatingCancelEventArgsWrapper(args));
}
开发者ID:MuffPotter,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:FrameNavigationService.cs
示例4: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
// Das Suchen nach Peers beenden
PeerFinder.Stop();
base.OnNavigatingFrom(e);
}
开发者ID:GregOnNet,项目名称:WP8BookSamples,代码行数:7,代码来源:ServerPage.xaml.cs
示例5: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
Browser.Navigating -= this.Browser_Navigating;
Browser.NavigationFailed -= this.Browser_NavigationFailed;
base.OnNavigatingFrom(e);
}
开发者ID:inthehand,项目名称:Charming,代码行数:7,代码来源:WebAuthenticationPage.xaml.cs
示例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));
}
开发者ID:ZeroInfinite,项目名称:PortablePrism,代码行数:7,代码来源:ViewModelAwarePage.cs
示例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);
}
开发者ID:Remmo,项目名称:WpWinNl,代码行数:27,代码来源:ExtendedPhonePage.cs
示例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();
}
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:34,代码来源:ChannelSetupRedirectWindow.xaml.cs
示例9: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (_camera == null) return;
// Dispose camera to minimize power consumption and to expedite shutdown.
_camera.Dispose();
}
开发者ID:0xdeafcafe,项目名称:FapChat,代码行数:7,代码来源:Capture.xaml.cs
示例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");
}
}
开发者ID:gxl-wex5,项目名称:WeX5_V3.3_pre_test,代码行数:27,代码来源:Scan.xaml.cs
示例11: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
//clean the view model
ViewModel.Cleanup();
base.OnNavigatingFrom(e);
}
开发者ID:rmarinho,项目名称:ForestFindr,代码行数:7,代码来源:Home.xaml.cs
示例12: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
webBrowser.Navigating -= webBrowser_Navigating;
_locationManager.OnPositionDetermined -= _locationManager_OnPositionDetermined;
_locationManager = null;
base.OnNavigatingFrom(e);
}
开发者ID:rowdynl,项目名称:tinder,代码行数:7,代码来源:InitialPage.xaml.cs
示例13: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (e.NavigationMode != NavigationMode.Back)
{
ViewModel.Tombstone();
}
}
开发者ID:PawelStroinski,项目名称:Diettr-GPL,代码行数:7,代码来源:Settings.xaml.cs
示例14: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (!alreadyEned)
{
EndTest();
}
}
开发者ID:k0stya,项目名称:quizApp,代码行数:7,代码来源:Test.xaml.cs
示例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();
}
}
开发者ID:renlesterdg,项目名称:dropbox-sdk-dotnet,代码行数:30,代码来源:LoginForm.xaml.cs
示例16: Browser_OnNavigating
private void Browser_OnNavigating(object sender, NavigatingCancelEventArgs e)
{
var url = e.Uri.ToString();
Logger.LogInfo("--> " + url);
if (url.Contains("#access_token"))
{
var token = url.Split('#')[1].Split('&')[0].Split('=')[1];
e.Cancel = true;
_Callback(token);
Hide();
}
//Hide the window when an error is shown... facebook with display its own error in the browser
//else if (url.Contains("error_code"))
//{
// var queryParameters = url.Split('?')[1].Split('&');
// var errorCode = queryParameters.FirstOrDefault(x => x.Contains("error_code")).Split('=')[1];
// var errorMessage = queryParameters.FirstOrDefault(x => x.Contains("error_message")).Split('=')[1];
// ErrorCode.Content = errorCode;
// ErrorMessage.Content = errorMessage;
// ErrorInfo.Visibility = Visibility.Visible;
// Loader.Visibility = Visibility.Collapsed;
// Browser.Visibility = Visibility.Collapsed;
//}
else
{
Title = "Login";
Loader.Visibility = Visibility.Collapsed;
Browser.Visibility = Visibility.Visible;
}
}
开发者ID:sbutler-nerdery,项目名称:desktop-tools,代码行数:34,代码来源:Login.xaml.cs
示例17: RootFrame_Navigating
void RootFrame_Navigating(object sender, NavigatingCancelEventArgs e)
{
//TODO just for testing. Remove folowing line
/*if(IsolatedStorageSettings.ApplicationSettings.Contains("user") == false)
IsolatedStorageSettings.ApplicationSettings.Add("user", API.Mock.UserMock.GetUser());*/
//End of TODO
if (IsolatedStorageSettings.ApplicationSettings.Contains("user") == true
|| e.Uri.OriginalString.Equals("app://external/"))
{
RootFrame.Navigating -= RootFrame_Navigating;
return;
}
else
{
e.Cancel = true;
RootFrame.Dispatcher.BeginInvoke(delegate
{
RootFrame.Navigating -= RootFrame_Navigating;
RootFrame.Navigate(new Uri("/LoginRegisterPage.xaml", UriKind.Relative));
});
}
}
开发者ID:chenkaigithub,项目名称:Cubbyhole-WP8,代码行数:25,代码来源:App.xaml.cs
示例18: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
//stop and reset the game when go away from this page
isPlaying = false;
isStarted = false;
//stop accelerometre reading
acl.Stop();
//reset the speed of the ball
speedX = -5;
speedY = -5;
//stop the bar
speedBar = 0;
//save the existing amount for new level calculating
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
if (!settings.Contains("Amount"))
{
//create the data if it hasn't been created yet
settings.Add("Amount", rectsAmount.ToString());
}
else
{
settings["Amount"] = rectsAmount.ToString();
}
settings.Save();
}
开发者ID:Chengxuan,项目名称:BreakIt,代码行数:25,代码来源:PlayPage.xaml.cs
示例19: OnNavigatingFrom
/// <summary>
/// Executes when leaving the page
/// </summary>
/// <param name="e"></param>
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
if (!cancel) //if navigation is caused not by pressing the Cancel button
{
//default index is the size of App.ViewModel.Tasks - element with default index doesn't exist
int index = App.ViewModel.Tasks.Count;
//ViewModel
MainViewModel model = (MainViewModel) DataContext;
//looking for the person, to whom taskList a new task should be added
for (int i = 0; i < model.Names.Count; i++)
{
if (checkedName == model.Names[i].PersonName)
{
index = model.Names[i].Id; //saving the index(Id) of the person, to whom taskList a new task should be added
}
}
//if index is not default
if (index < App.ViewModel.Tasks.Count)
{
//Adding a task to taskList of "checked(in CheckBox)" person
App.ViewModel.Tasks[index].Add(new ItemViewModel()
{TaskName = EnterNameBox.Text, Category = category});
}
App.ViewModel.SaveData();
}
}
开发者ID:CheViana,项目名称:People-Tasker,代码行数:34,代码来源:New+Task.xaml.cs
示例20: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
// If the session is still in progress, save it and we can resume it later.
// TODO Save what the user has currently typed into the box
try {
using (var storage = IsolatedStorageFile.GetUserStoreForApplication()) {
// Treat the back key as exiting and not saving
if ((session != null && !session.IsFinished) && e.NavigationMode != NavigationMode.Back) {
using (var file = storage.OpenFile("Session", FileMode.Create, FileAccess.Write, FileShare.None)) {
using (var sw = new StreamWriter(file)) {
var json = session.ToJson(new JsonContext());
JsonValue.WriteMin(json, sw);
}
}
} else {
storage.DeleteFile("Session");
}
}
} catch (IsolatedStorageException) {
return;
} catch (IOException) {
return;
} catch (FormatException) {
return;
}
base.OnNavigatingFrom(e);
}
开发者ID:aata,项目名称:flashcards-wp7,代码行数:29,代码来源:Practice.xaml.cs
注:本文中的System.Windows.Navigation.NavigatingCancelEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论