NavigationService.GetNavigationService Returning Null

785 views
Skip to first unread message

Bill Kempf

unread,
Jun 15, 2009, 9:51:05 AM6/15/09
to wpf-di...@googlegroups.com
Arghhh. Can I say again, I hate WPF navigation.

I've got this "little" issue. I've got a Window, which contains a
Frame, which in turn has been navigated to a Page initially through
the Source property. A couple of other pages have been navigated to
through the use of
NavigationService.GetNavigationService(page).Navigate(uri). One such
page when navigated to tries to get the NavigationService in a Loaded
event handler, and at this point
NavigationService.GetNavigationService(page) returns null! I don't
know how this could be, and I'm not at all sure how to go about
figuring out why? Anyone got any suggestions?

--
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

War is peace. Freedom is slavery. Bugs are features.

Bill Kempf

unread,
Jun 15, 2009, 11:26:25 AM6/15/09
to wpf-di...@googlegroups.com
Which means rolling your own navigation since WinForms doesn't have
anything built-in. In that case, I'd be better off rolling my own in
WPF. Which, in fact, I would be! But, unfortunately, neither is an
option.

On Mon, Jun 15, 2009 at 11:23 AM, Sacha Barber<sacha...@hotmail.com> wrote:
> Use winforms!!!! Tee hee
>
>> Date: Mon, 15 Jun 2009 09:51:05 -0400
>> Subject: [WPF Disciples] NavigationService.GetNavigationService Returning
>> Null
>> From: wek...@gmail.com
>> To: wpf-di...@googlegroups.com

> ________________________________
> Beyond Hotmail - see what else you can do with Windows Live. Find out more.

Sacha Barber

unread,
Jun 15, 2009, 11:30:03 AM6/15/09
to wpf-di...@googlegroups.com
I know I was only joking
 
> Date: Mon, 15 Jun 2009 11:26:25 -0400
> Subject: [WPF Disciples] Re: NavigationService.GetNavigationService Returning Null

Upgrade to Internet Explorer 8 Optimised for MSN. Download Now

Mike Brown

unread,
Jun 15, 2009, 11:30:20 AM6/15/09
to wpf-di...@googlegroups.com
Bill have you had a chance to check out nRoute? It's pretty incredible! From what I'm reading there are several cases that causes NavigationService to return empty, none of them appear to apply to you. Rather than using the GetNavigationService method have you tried the Page.NavigationService property? Doubt it'd make a difference though.

Bill Kempf

unread,
Jun 15, 2009, 11:50:33 AM6/15/09
to wpf-di...@googlegroups.com
Where I'm at, there's no guarantee I'll have a Page, but I can try and
special case that. Like you, though, I doubt it will make much
difference.

No, I haven't looked hard at nRoute yet, but I don't think that's any
more an option for me now than rolling my own navigation framework.
Too much code reliant on the WPF navigation services.

Bill Kempf

unread,
Jun 15, 2009, 2:38:02 PM6/15/09
to wpf-di...@googlegroups.com
Argh. Never mind folks. This one was my stupidity.

Sacha Barber

unread,
Jun 15, 2009, 4:11:17 PM6/15/09
to wpf-di...@googlegroups.com
Silly Billy
 
> Date: Mon, 15 Jun 2009 14:38:02 -0400

> Subject: [WPF Disciples] Re: NavigationService.GetNavigationService Returning Null
> From: wek...@gmail.com
> To: wpf-di...@googlegroups.com
>
>

View your Twitter and Flickr updates from one place – Learn more!

Sacha Barber

unread,
Jun 15, 2009, 11:23:11 AM6/15/09
to wpf-di...@googlegroups.com
Use winforms!!!! Tee hee
 
> Date: Mon, 15 Jun 2009 09:51:05 -0400
> Subject: [WPF Disciples] NavigationService.GetNavigationService Returning Null
> From: wek...@gmail.com
> To: wpf-di...@googlegroups.com
>
>
Reply all
Reply to author
Forward
0 new messages