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
0 answers

Combining 2 commands in MVVM

So in this datagrid and then I want double click on a datarow and then pass the selecteditem to the next user control. I'm using a navigation service which i have seen on SingletonSean. However, I'm not sure how to combine those 2 things. My…
zumie
  • 23
  • 5
0
votes
1 answer

Windows Template Studio WPF Navigation

I have a simple WPF app (code-behind) and would like to navigate from one view to another in code-behind. In UWP, I could do this NavigationService.Navigate(typeof(destinationView), "myParam"); since the NavigationService was a public static…
cdt
  • 5
  • 3
0
votes
2 answers

Unable to Navigate pages while keeping the tab bar accessible in xamarin forms

So I have a tab bar and some pages attached to it, and what I'm trying to do is navigate to a different page(not a tab bar page) by clicking a button which is present in one of these tab bar pages, on doing so that page is replacing the tab bar, how…
Venky
  • 1,929
  • 3
  • 21
  • 36
0
votes
0 answers

NavigationService for Xamarin.Forms MVVM :Wait() vs await

I was working on a simpleNavigation Service to learn the basic principles and in fact it was very helpful to understand this concept. When I was making trial and error to incorporate it to my application, I used the NavigateModalAsync() of…
TiTus
  • 77
  • 9
0
votes
1 answer

How to navigate to a xaml page from ResourceDictionary class (WPF)

I have a ResourceDictionary class as follows: using System.Windows.Navigation; using static myApp.filesXAML.Login; namespace myApp.Clases { partial class functionsMenu : ResourceDictionary { …
Fabián Romo
  • 319
  • 2
  • 14
0
votes
2 answers

Is there a "Before" Navigated event?

Im using WPF with Navigation Service. I need to catch a situation before the next page is navigated. Is thera any event "before" next page is navigated? Navigate("MyPage1.xaml") Navigate("MyPage2.xaml")'now, I need a event which shows me :…
goldengel
  • 611
  • 8
  • 22
0
votes
1 answer

How can I use MVVM's Light NavigationService with subframes, like in NavigationView control?

The NavigationService system that comes with MVVM Light seems to assume that I want to make the whole window navigate to another page, however, I would like to have a lateral bar from which I can select to which page to go, something like a…
Tonon
  • 67
  • 2
  • 4
0
votes
2 answers

Setting the ViewModel of a View when using Navigation Service in Silverlight

I'm am having trouble finding out how I would create an instance of a view model and set that as the view model of a view am I am going to navigate to using the Silverlight navigation framework. for instance, If I have a list view with a view model,…
0
votes
1 answer

How to navigate to a view from the viewmodel

I'm wondering if someone could give me some guidance on a Silverlight problem I'm having? What I am doing now is building a page in Silverlight using the MVVM pattern to retrieve and display my data. My page will be a standard "List" type page that…
0
votes
2 answers

how to use the same instance of the view in the navigationservice.navigate() in wpf

I have two views (viewA and viewB), where I navigate between them in the mainwindow using navigationservice. I need to use the same instance of viewA after navigating multiple times.
Galilo Galilo
  • 519
  • 5
  • 22
0
votes
1 answer

Debugging CommonServiceLocator.ActivationExeption in MVVMLight

I'm trying to use Ioc in MVVMLight. SimpleIoc works fine with my ViewModel, but not the NavigationService. I've drawn a blank googling the error, but suspect the problem might be in my conversion of various C# snippets to VB.net ?
Maf
  • 345
  • 3
  • 9
0
votes
1 answer

C# Recurrant / Circular Navigation Best Practice

Consider a C# application with the pages A, B, and C and the following flow. A -> B B -> C C -> A A -> B ... I'm currently navigating using this line of code in each page. this.NavigationService.Navigate(new B()); A few questions. Is it…
Dan Grahn
  • 9,044
  • 4
  • 37
  • 74
0
votes
1 answer

Pass Field from one page to another page in WPF using MVVM

We are making a project where we have one page of our WPF application which will choose a save game out of three, and then it navigates to the next page. We whould like to know how to pass the GameInstance we load from the first page, to the second.…
0
votes
0 answers

Navigation from menu frame to content frame

I have found this issue here: WPF Navigate Pages from outside frame But never solved, I have the same issue and same window structure:
1 2 3
8 9