本文整理汇总了C#中Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# NavigatingCancelEventArgs类的具体用法?C# NavigatingCancelEventArgs怎么用?C# NavigatingCancelEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigatingCancelEventArgs类属于Windows.UI.Xaml.Navigation命名空间,在下文中一共展示了NavigatingCancelEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
SystemNavigationManager.GetForCurrentView().BackRequested -= this.Zoom_BackRequested;
SemanticZoom.ViewChangeStarted -= SemanticZoom_ViewChangeStarted;
}
示例2: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
((BIRCViewModel)currentDataContext).GetSelectedConnection().OnAddHistory -= MainPage_OnAddHistory;
((BIRCViewModel)currentDataContext).OnBeforeServerSelectionChanged -= CurrentDataContext_OnBeforeServerSelectionChanged;
((BIRCViewModel)currentDataContext).OnAfterServerSelectionChanged -= CurrentDataContext_OnAfterServerSelectionChanged;
Loaded -= MainPage_Loaded;
}
示例3: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (ScenarioDisableButton.IsEnabled)
{
ScenarioDisable();
}
}
示例4: OnNavigatingFrom
// Cleanup scenario when it is about to be unloaded.
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if (m_scenario1ViewModel != null)
{
m_scenario1ViewModel.ScenarioCleanup();
}
}
示例5: NavigatingCancelEventArgsWrapper
public NavigatingCancelEventArgsWrapper([NotNull] NavigatingCancelEventArgs args, string parameter, bool bringToFront)
{
Should.NotBeNull(args, nameof(args));
_args = args;
_parameter = parameter;
_bringToFront = bringToFront;
}
示例6: OnNavigatingFrom
protected override async void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
Debug.WriteLine(e.SourcePageType);
if (!isSave)//e.parameter 是否放弃
{
if (e.Parameter == null)
{
e.Cancel = true;
MessageDialog dialog = new MessageDialog("你尚未保存更改,是否放弃");
dialog.Commands.Add(new UICommand("放弃") { Id = true });
dialog.Commands.Add(new UICommand("继续编辑") { Id = false });
var result = await dialog.ShowAsync();
if ((bool)result.Id)
{
e.Cancel = false;
Frame.Navigate(e.SourcePageType, true);
}
else
{
e.Cancel = true;
}
}
}
else
{
}
}
示例7: OnNavigating
private async void OnNavigating(object sender, NavigatingCancelEventArgs e)
{
await QmunicateLoggerHolder.Log(QmunicateLogLevel.Debug, "OnNavigating. SourcePageType=" + e.SourcePageType + " Mode=" + e.NavigationMode);
var handler = Navigating;
if (handler != null)
{
handler.Invoke(sender, e);
}
//if (!e.Cancel)
//{
// switch (e.NavigationMode)
// {
// case NavigationMode.Back:
// NavigatedFrom(e);
// break;
// case NavigationMode.Forward:
// break;
// case NavigationMode.New:
// NavigatedFrom(e);
// break;
// case NavigationMode.Refresh:
// break;
// }
//}
}
示例8: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
// Before we navigate away from the page, we want to generate a new _persistedPosition string. This string contains the key of the item at the top of the
// viewing window (generated by the function GetKey) and the offset of that item.
RestoreScrollPositionSample._persistedPosition = ListViewPersistenceHelper.GetRelativeScrollPosition(this.ItemsListView, this.GetKey);
base.OnNavigatingFrom(e);
}
示例9: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
CashFlowUserControl.Dispose();
CategorySpreadingUserControl.Dispose();
base.OnNavigatingFrom(e);
}
示例10: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
RossPathDisplay.CleanUp();
//viewModel.CleanUpForPageChange();
this.viewModel = null;
}
示例11: ComponentActivatorOnNavigating
private void ComponentActivatorOnNavigating(object sender, NavigatingCancelEventArgs e)
{
if (e.NavigationMode == NavigationMode.New)
{
_storageCoordinator.Save(StorageMode.Temporary);
}
}
示例12: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
controller.RemoveListener(listener);
controller.Dispose();
base.OnNavigatingFrom(e);
}
示例13: NavigatingEventArgs
public NavigatingEventArgs(DeferralManager manager, NavigatingCancelEventArgs e, Page page, object parameter) : this(manager)
{
NavigationMode = e.NavigationMode;
PageType = e.SourcePageType;
Page = page;
Parameter = parameter;
}
示例14: OnNavigatingFrom
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
var viewModel = DataContext as INavigationAware;
if (viewModel != null)
viewModel.OnNavigatingFrom(new NavigatingCancelContext(true, (NavigationMode)e.NavigationMode, () => e.Cancel, (cancel) => e.Cancel = cancel));
}
示例15: NavigatingArgs
public NavigatingArgs(NavigatingCancelEventArgs e)
{
NavigationMode = e.NavigationMode.ToNavigationModes();
NavigationTransitionInfo = e.NavigationTransitionInfo;
Parameter = e.Parameter;
SourcePageType = e.SourcePageType;
}