當前位置: 首頁>>代碼示例>>C#>>正文


C# Navigation.NavigatingCancelEventArgs類代碼示例

本文整理匯總了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();
     }
 }
開發者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


注:本文中的System.Windows.Navigation.NavigatingCancelEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。