示例#1
0
 /// <summary>
 /// Called when a this instance becomes the active content in a frame.
 /// </summary>
 /// <param name="e">An object that contains the navigation data.</param>
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     if (NavigatedTo != null)
     {
         NavigatedTo.Invoke(this, e);
     }
 }
示例#2
0
        public void OnNavigatedTo(Navigation Navigation)
        {
            if (IsDisposing)
            {
                return;
            }

            Info(string.Format("Navigated to: {0}", Navigation));
            NavigatedTo?.Invoke(this, new CodeProjectNavigationEventArgs(Navigation));
        }
示例#3
0
        /// <summary>
        /// Raises the <see cref="NavigatedTo"/> event.
        /// </summary>
        /// <param name="e">The <see cref="NavigatedEventArgs"/> instance containing the event data.</param>
        protected void RaiseNavigatedTo(NavigatedEventArgs e)
        {
            if (!CanHandleNavigation())
            {
                return;
            }

            Log.Debug("Navigated to '{0}'", NavigationTargetType);

            DetermineNavigationContext();

            NavigatedTo?.Invoke(this, e);
        }
示例#4
0
        private async Task NavigateIntenal(object viewModel)
        {
            NavigationStarted?.Invoke(viewModel);

            var request = new NavigationRequest(viewModel);

            NavigationRequested?.Invoke(this, request);

            if (request.NavigationTasks != null)
            {
                await Task.WhenAll(request.NavigationTasks);
            }

            NavigatedTo?.Invoke(viewModel);
        }
示例#5
0
        public async Task NavigateTo(PageType pageType, object parameter = null)
        {
            string routeId;

            switch (pageType)
            {
            case PageType.Location:
                routeId = "//summary/location";
                break;

            case PageType.Options:
                routeId = "//options";
                break;

            default:
                throw new NotImplementedException(nameof(pageType));
            }
            NavigatedTo?.Invoke(this, new NavigatedToEventArgs(pageType, parameter));
            await Shell.Current.GoToAsync(routeId);
        }
示例#6
0
 internal void SendNavigatedTo(NavigatedToEventArgs args)
 {
     NavigatedTo?.Invoke(this, args);
     OnNavigatedTo(args);
 }
示例#7
0
 void OnNavigatedTo(NavigatedArgs e)
 {
     NavigatedTo?.Invoke(this, e);
 }
示例#8
0
 /// <summary>
 /// Handles the <see cref="E:NavigatedTo"/> event.
 /// </summary>
 /// <param name="e">The <see cref="FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs"/> instance containing the event data.</param>
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     NavigatedTo?.Invoke(this, e);
 }