WPF c# window navigation -


i got 2 window , want navigate 1 when debug , shows nav null , why so? suppose null? because used same way navigate in past , work , try , doesn't work. if put nav == null , says

nav.navigate(new uri("homemenu.xaml", urikind.relativeorabsolute));

is null

here have :

            navigationservice nav = navigationservice.getnavigationservice(this);         if (nav != null)         {             nav.navigate(new uri("homemenu.xaml", urikind.relativeorabsolute));         } 

is how can navigate window user control page?

getnavigationservice returns null when dependencyobject:

  • is navigationwindow.

  • is frame that:

    1) hosted navigator.

    2) has journalownership property set usesparentjournal.

  • is not part of content hosted navigator.

http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.getnavigationservice.aspx


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -