当前位置: 首页>>代码示例>>C#>>正文


C# Navigation.NavigatingCancelEventArgs类代码示例

本文整理汇总了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;
 }
开发者ID:aurora-lzzp,项目名称:com.aurora.aumusic,代码行数:7,代码来源:ArtistPage.xaml.cs

示例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;
 }
开发者ID:charla-n,项目名称:BIRC,代码行数:7,代码来源:MainPage.xaml.cs

示例3: OnNavigatingFrom

 protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
 {
     if (ScenarioDisableButton.IsEnabled)
     {
         ScenarioDisable();
     }
 }
开发者ID:jigartailor1984,项目名称:UWPAppSamples,代码行数:7,代码来源:Scenario2_ShakeEvents.xaml.cs

示例4: OnNavigatingFrom

 // Cleanup scenario when it is about to be unloaded.
 protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
 {
     if (m_scenario1ViewModel != null)
     {
         m_scenario1ViewModel.ScenarioCleanup();
     }
 }
开发者ID:COMIsLove,项目名称:Windows-universal-samples,代码行数:8,代码来源:Scenario1.xaml.cs

示例5: NavigatingCancelEventArgsWrapper

 public NavigatingCancelEventArgsWrapper([NotNull] NavigatingCancelEventArgs args, string parameter, bool bringToFront)
 {
     Should.NotBeNull(args, nameof(args));
     _args = args;
     _parameter = parameter;
     _bringToFront = bringToFront;
 }
开发者ID:dbeattie71,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:NavigatingCancelEventArgsWrapper.cs

示例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
            {

            }
        }
开发者ID:RedrockMobile,项目名称:CyxbsMobile_Win,代码行数:30,代码来源:RemindListPage.xaml.cs

示例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;
            //    }
            //}
        }
开发者ID:QuickBlox,项目名称:q-municate-dotnet,代码行数:26,代码来源:NavigationService.cs

示例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);
 }
开发者ID:C-C-D-I,项目名称:Windows-universal-samples,代码行数:7,代码来源:RestoreScrollPositionSample.xaml.cs

示例9: OnNavigatingFrom

        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            CashFlowUserControl.Dispose();
            CategorySpreadingUserControl.Dispose();

            base.OnNavigatingFrom(e);
        }
开发者ID:jgodinez,项目名称:MoneyManager,代码行数:7,代码来源:StatisticsView.xaml.cs

示例10: OnNavigatingFrom

 protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
 {
     base.OnNavigatingFrom(e);
     RossPathDisplay.CleanUp();
     //viewModel.CleanUpForPageChange();
     this.viewModel = null;
 }
开发者ID:dolkensp,项目名称:OTWB,代码行数:7,代码来源:RossPage.xaml.cs

示例11: ComponentActivatorOnNavigating

 private void ComponentActivatorOnNavigating(object sender, NavigatingCancelEventArgs e)
 {
     if (e.NavigationMode == NavigationMode.New)
     {
         _storageCoordinator.Save(StorageMode.Temporary);
     }
 }
开发者ID:aloker,项目名称:Caliburn.Micro.Autofac,代码行数:7,代码来源:StartStorage.cs

示例12: OnNavigatingFrom

        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            controller.RemoveListener(listener);
            controller.Dispose();

            base.OnNavigatingFrom(e);
        }
开发者ID:rkrishnasanka,项目名称:LeapRT,代码行数:7,代码来源:MainPage.xaml.cs

示例13: NavigatingEventArgs

 public NavigatingEventArgs(DeferralManager manager, NavigatingCancelEventArgs e, Page page, object parameter) : this(manager)
 {
     NavigationMode = e.NavigationMode;
     PageType = e.SourcePageType;
     Page = page;
     Parameter = parameter;
 }
开发者ID:Rasetech,项目名称:Template10,代码行数:7,代码来源:NavigatingEventArgs.cs

示例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));
 }
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:7,代码来源:ViewModelAwarePage.cs

示例15: NavigatingArgs

 public NavigatingArgs(NavigatingCancelEventArgs e)
 {
     NavigationMode = e.NavigationMode.ToNavigationModes();
     NavigationTransitionInfo = e.NavigationTransitionInfo;
     Parameter = e.Parameter;
     SourcePageType = e.SourcePageType;
 }
开发者ID:teamneusta,项目名称:Template10,代码行数:7,代码来源:NavigatingArgs.cs


注:本文中的Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。