当前位置: 首页>>代码示例>>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;未经允许,请勿转载。