當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。