Questions tagged [navigationservice]

NavigationService Class is a .NET Framework class which contains methods, properties, and events to support navigation. Namespace is System.Windows.Navigation.

From MSDN's documentation on NavigationService:

NavigationService encapsulates the ability to download content within the context of a browser-style navigation.

Content can be any type of .NET Framework object and HTML files. In general, however, pages are the preferred as the way to package content for navigation Content can be navigated to by providing an instance of an object and calling an overload of the Navigate method that accepts an object:

NavigationService.Navigate(Object)
NavigationService.Navigate(Object, Object)

Alternatively, content can be navigated to by passing a relative or absolute uniform resource identifier (URI) to one of the Navigate method overloads that accepts a URI:

NavigationService.Navigate(Uri)
NavigationService.Navigate(Uri, Object)
NavigationService.Navigate(Uri, Object, Boolean)

When content is navigated to by URI, NavigationService will return an object that contains the content.

The lifetime of a navigation can be tracked through the following events:

Navigating
Navigated
NavigationProgress
NavigationFailed
NavigationStopped
LoadCompleted
FragmentNavigation
128 questions
0
votes
1 answer

How to programmatically use Prism's NavigationService?

I implemented and it works navigation with NavigationService by Prism: protected override void OnInitialized() { InitializeComponent(); NavigationService.NavigateAsync("FirstPage?title=FirstPage"); } protected override void…
Ish Thomas
  • 2,270
  • 2
  • 27
  • 57
0
votes
1 answer

Prevent Loaded Event when KeepAlive="True WPF

I am using the KeepAlive property on a page so that I am able to navigate back to it in the state that the user left it in. The user is able to search for a Company, look at further details on the Company in an additional page, and then navigate…
CBreeze
  • 2,925
  • 4
  • 38
  • 93
0
votes
1 answer

Issues with wrapping PrismForms NavigationService

In PrismForms we got the problem, that the NavigationStack is empty after navigating to a new page. That means after using the hardware back-button on the SecondPage, the app is closed. Although the back-arrow in the header on Android isnt shown. If…
0
votes
1 answer

Xamarin Prism Navigation in master detail cause reload of entire page on very navigation

When I navigate from my master to another detail view and y return to the original pages, this is loading everything like it was the first time, is this the expected behavior or what I am doing wrong? this is what happening from my login page y…
Virtualman
  • 11
  • 2
0
votes
2 answers

WPF NavigationService "RemoveBackEntry" is removing the oldest entry, rather than the most recent

I have a fairly simple WPF application with a handful of pages. Upon submit of a form, I'm wanting to navigate to a specific page, then clear out the last navigation entry so that the user is unable to then resubmit that form they had just…
ghost_mv
  • 1,170
  • 4
  • 20
  • 43
0
votes
1 answer

MVVM Light Navigation Service - Change MainWindow Title and Size

I'm creating a new WPF application with (my first WPF app): .Net 4.0 MVVM Light C# MahApps Metro I've already implemented navigation using the Navigation Service in MVVM Light. I'm using a MainWindow and Pages in order to accomplish the same. In…
Luis de Haro
  • 711
  • 1
  • 7
  • 28
0
votes
1 answer

NavigateAsync doesn't navigate when viewmodel is injected

All day long, I'm calling await this.NavigationService.NavigateAsync(typeof(Views.MyStankView)); And everything works great. Until I x:Bind a button click to another viewmodel that inherits from (MVVM-Light's) ViewModelBase and (Template10's)…
Maelstrom
  • 71
  • 9
0
votes
0 answers

kinect, c# how to resolve NullReferenceException when I use NavigationService?

Like this capture's source code, I want to use NavigationService's GoBack() method when my gesture is recognized. (this source code is MainWindows.Gestures.cs) But, When I use GoBack() method in somethig.xaml, there is not exception. I added all…
0
votes
1 answer

Modern UI WPF - Manual Page Navigation (from ViewModel or View\Control\code-behind)

I have an MVVM application that I'm trying to move over to Modern UI, but I can't seem to figure out the Navigation Service... Basically, my ViewModel is an ObservableCollection with an "AddItem" method, as an ICommand. When this method is…
turkinator
  • 905
  • 9
  • 25
0
votes
2 answers

Navigation Service in WPF

I created a simple application in WPF and added one page. I also added one button to the main window, and when I click on it, it brings the page added. But now, I want to go back from the page to the main windows by using another button. I tried to…
Kayode
  • 3
  • 1
  • 6
0
votes
0 answers

WPF NavigationService is null

I'm learning WPF (moving from Procedural PHP) and have written the following to navigate from 'MainWindow' to 'Page1', where there are no errors with the login credentials, but the local variable 'nav' is always null (hence displaying an error…
Matt
  • 11
  • 3
0
votes
1 answer

How to navigate to a special frame with prism for store apps in Windows 8.1

I am relative new in the sector of App Developement for Windows RT and UWP and now I have a Windows 8.1 project where I want to use Prism. The app (a quiz game) consists of three pages and I want to implement a page header which is the same on all…
0
votes
1 answer

C# navigation service goback

I wan't to know the name to the back Window. I don't how can I make that. For the moment, my code is : if (this.NavigationService.CanGoBack) { this.NavigationService.GoBack(); }
Moussawi
  • 393
  • 1
  • 6
  • 22
0
votes
1 answer

Windows Phone 8 NavigationService.Navigate throws a NullReferenceException

I am working on a C# Project for WindowsPhone 8. When the user deactivates the App (i.e. Going to the main menu) I stop some timers and save some things. This works fine. But when the user reactivates the app I want to navigate the user to a pause…
Lexu
  • 579
  • 1
  • 5
  • 14
0
votes
2 answers

Navigation Service on Another Frame

I currently have a program that has a Window containing two frames, one at the top of the screen, similar to a navigation panel where the user can click on different buttons to navigate to areas of the program, which are loaded into the frame…
CBreeze
  • 2,925
  • 4
  • 38
  • 93
1 2 3
8 9