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


C# NavigationEventArgs类代码示例

本文整理汇总了C#中NavigationEventArgs的典型用法代码示例。如果您正苦于以下问题:C# NavigationEventArgs类的具体用法?C# NavigationEventArgs怎么用?C# NavigationEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NavigationEventArgs类属于命名空间,在下文中一共展示了NavigationEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnNavigatedTo

 // Load data for the ViewModel Items
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (!App.ViewModel.IsDataLoaded)
     {
         App.ViewModel.LoadData();
     }
 }
开发者ID:Jurabek,项目名称:telephony,代码行数:8,代码来源:MainPage.xaml.cs

示例2: NavigatedEventArgs

 public NavigatedEventArgs(NavigationEventArgs e, Page page)
 {
     Page = page;
     PageType = e.SourcePageType;
     Parameter = e.Parameter;
     NavigationMode = e.NavigationMode;
 }
开发者ID:teamneusta,项目名称:Template10,代码行数:7,代码来源:NavigatedEventArgs.cs

示例3: NavigationEventArgsAdapter

        internal NavigationEventArgsAdapter( NavigationEventArgs source )
        {
            Contract.Requires( source != null );

            this.source = source;
            Uri = source.Uri;
            IsSuccess = true;
        }
开发者ID:WaffleSquirrel,项目名称:More,代码行数:8,代码来源:NavigationEventArgsAdapter.cs

示例4: DialogWebBrowserOnLoadCompleted

        async private void DialogWebBrowserOnLoadCompleted(object sender, NavigationEventArgs args)
#endif
        {
            if (args.Uri.ToString().StartsWith("https://www.facebook.com/connect/login_success.html"))
            {
                if (ParentControlPopup != null)
                {
                    ParentControlPopup.IsOpen = false;
                }

                if (!args.Uri.Fragment.Contains("access_token"))
                {
                    // this callback is in return for the dialog, so just cancel it.

                    if (OnDialogFinished != null)
                    {
                        OnDialogFinished(WebDialogResult.WebDialogResultDialogCompleted);
                    }

                    return;
                }

                try
                {
                    var client = new FacebookClient();
                    var authResult = client.ParseOAuthCallbackUrl(args.Uri);

                    client = new FacebookClient(authResult.AccessToken);
                    var parameters = new Dictionary<string, object>();
                    parameters["fields"] = "id";

                    var result = await client.GetTaskAsync("me", parameters);
                    var dict = (IDictionary<string, object>)result;

                    Session.ActiveSession.CurrentAccessTokenData = new AccessTokenData
                    {
                        AccessToken = authResult.AccessToken,
                        Expires = authResult.Expires,
                        FacebookId = (string)dict["id"],
                        AppId = Session.AppId
                    };

                    if (Session.OnFacebookAuthenticationFinished != null)
                    {
                        Session.OnFacebookAuthenticationFinished(Session.ActiveSession.CurrentAccessTokenData);
                    }

                    if (Session.OnSessionStateChanged != null)
                    {
                        Session.OnSessionStateChanged(LoginStatus.LoggedIn);
                    }
                }
                catch (Facebook.FacebookOAuthException exc)
                {
                    // TODO: (sanjeevd) catch appropriately
                }
            }
        }
开发者ID:alykhaled,项目名称:facebook-winclient-sdk,代码行数:58,代码来源:WebDialogUserControl.xaml.cs

示例5: InternalOnNavigatedFrom

		protected internal override void InternalOnNavigatedFrom(NavigationEventArgs e)
		{
			base.InternalOnNavigatedFrom(e);

			var frameState = SuspensionManager.SessionStateForFrame(Frame);
			var pageState = new Dictionary<String, Object>();
			SaveState(pageState);
			frameState[pageKey] = pageState;
		}
开发者ID:fstn,项目名称:WindowsPhoneApps,代码行数:9,代码来源:ExtendedPage.cs

示例6: DumpExistingViewModel

 protected virtual void DumpExistingViewModel(NavigationEventArgs e)
 {
     // Make sure we get a new VM each time we arrive at the page
     if (e.NavigationMode != NavigationMode.Back)
     {
         DataContext = null;
         ViewModel = null;
     }
 }
开发者ID:builttoroam,项目名称:BuildIt,代码行数:9,代码来源:BasePhonePage.cs

示例7: FrameNavigated

		void FrameNavigated(object sender, NavigationEventArgs e)
		{
#if WINDOWS_PHONE
			if (e.IsNavigationInitiator)
#endif
			{
				Dispose();
			}
		}
开发者ID:selaromdotnet,项目名称:Coding4FunToolkit,代码行数:9,代码来源:ImageTile.cs

示例8: OnNavigatedFrom

        /// <summary>
        /// Invoked immediately after the Page is unloaded and is no longer the current source of a parent Frame.
        /// </summary>
        /// <param name="e">Event data that can be examined by overriding code. The event data is representative of the navigation that has unloaded the current Page.</param>
        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);

            var vm = this.DataContext as BaseViewModel;

            if (vm != null)
            {
                vm.OnLeft();
            }
        }
开发者ID:notour,项目名称:WygwamToolkit,代码行数:15,代码来源:BasePage.cs

示例9: OnNavigatedFrom

        /// <summary>
        /// Invoked immediately after the page is unloaded and is no longer the current source of a parent frame.
        /// </summary>
        /// <param name="e">An object that contains the event data.</param>
        protected override async void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);

            var handler = DataContext as IHandleNavigatedFrom;

            if (handler != null)
            {
                await InvokeHandlerOnNavigatedFromAsync(handler, e.ToNavigationServiceNavigationEventArgs());
            }
        }
开发者ID:Cimbalino,项目名称:Cimbalino-Toolkit,代码行数:15,代码来源:ExtendedPageBase.cs

示例10: OnNavigatedTo

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (e.ExtraData == null)
            {
                // user inadvertently landed to the error page, redirect to the home page
                this.GetNavigator().Navigate(new Uri("/Home", UriKind.Relative));
                return;
            }

            ApplicationUnhandledExceptionEventArgs errorArgs = e.ExtraData as ApplicationUnhandledExceptionEventArgs;
            errorDetails.Text = errorArgs.ExceptionObject.Message + "\n" + errorArgs.ExceptionObject.StackTrace;
        }
开发者ID:smashinggithub,项目名称:DevForce2012-NativeDevForce2012API,代码行数:13,代码来源:ErrorPage.xaml.cs

示例11: OnFirstNavigation

        private void OnFirstNavigation( object sender, NavigationEventArgs e )
        {
            Contract.Requires( sender != null );
            Contract.Requires( e != null );

            var frame = (Frame) sender;

            frame.Navigated -= OnFirstNavigation;
            frame.ContentTransitions = transitions ?? new TransitionCollection() { new NavigationThemeTransition() };

            transitions = null;
        }
开发者ID:WaffleSquirrel,项目名称:More,代码行数:12,代码来源:FrameShellViewBase.cs

示例12: FacadeNavigatedEventHandler

 void FacadeNavigatedEventHandler(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e)
 {
     foreach (var handler in _navigatedEventHandlers)
     {
         var args = new NavigationEventArgs()
         {
             NavigationMode = e.NavigationMode,
             Parameter = (e.Parameter == null) ? string.Empty : e.Parameter.ToString()
         };
         handler(this, args);
     }
 }
开发者ID:h82258652,项目名称:Samples,代码行数:12,代码来源:NavigationFacade.cs

示例13: OnNavigatedTo

        /// <summary>
        /// When navigating to this page, DataContext.ImageStream will be set as the source
        /// for the Image control in XAML. If ImageStream is null, application will navigate
        /// directly back to the main page.
        /// </summary>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (_dataContext.ImageStream != null)
            {
                _bitmap.SetSource(_dataContext.ImageStream);
                image.Source = _bitmap;
            }
            else
            {
                NavigationService.GoBack();
            }

            base.OnNavigatedTo(e);
        }
开发者ID:tanhuiyan,项目名称:vlc-localization,代码行数:19,代码来源:PreviewPage.xaml.cs

示例14: ContentFrame_Navigated

        // set the browser's page title using branded format string
        private void ContentFrame_Navigated(object sender, NavigationEventArgs e)
        {
            string title = string.Empty;
            object content = e.Content;

            if (content == null)
                content = ContentFrame.Content;

            if (content is Page)
                title = ((Page)content).Title;

            if (CrossPlatform.IsHtmlPageEnabled())
                CrossPlatform.SetDocumentTitle("Intersoft ClientUI Application | " + title);
        }
开发者ID:smashinggithub,项目名称:DevForce2012-NativeDevForce2012API,代码行数:15,代码来源:MainPage.xaml.cs

示例15: OnNavigatedTo

 protected override void OnNavigatedTo(NavigationEventArgs args)
 {
     if (Manager.CanGoBack)
     {
         BackButton = Button.TextButton(Manager, Languages.OctoClient.Back);
         BackButton.VerticalAlignment = VerticalAlignment.Top;
         BackButton.HorizontalAlignment = HorizontalAlignment.Left;
         BackButton.LeftMouseClick += (s, e) =>
         {
             Manager.NavigateBack();
         };
         BackButton.Margin = new Border(10, 10, 10, 10);
         Controls.Add(BackButton);
     }
 }
开发者ID:BlackOrca,项目名称:octoawesome,代码行数:15,代码来源:BaseScreen.cs


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