0
votes

I have a big project which include 2 little projects ( 1 WP8 and 1 WP7 with XNA), when I try to navigate from project WP8 to project WP7 I encounter this error:

System.InvalidOperationException: No XAML was found at the location '/test;component/GamePage.xaml'.

My project called "test" is in reference in project WP8. To focus the problem I made a try, I have create a third project called "test2" in WP7 without XNA, and when I try to navigate WP8 -> WP7 without XNA it's a success, but also fail for WP8 -> WP7 -> WP7(XNA).

To navigate from different project I use that (example):

NavigationService.Navigate(new Uri("/test;component/GamePage.xaml", UriKind.Relative));

So the problem come from XNA. Anyone got a solution to permit navigation in different projects that includes XNA?

1
Is your WP7 with XNA project a Silverlight project, too?pinckerman

1 Answers

0
votes

If I get your problem, here is my answer.

XNA hasn't the concept of page. If you need to "navigate" you have to use Silverlight in your WP7 project. Otherwise, if you can't use Silverlight, you have to implement your "page" class that will manage what you need (buttons and detecting touches) and then, when you want to launch the GamePage you simply call it, hiding or deactivating the menu class.
Of course every page has to inherit from DrawableGameComponent.