0
votes

I am writing application on Windows Phone 8.1 and I have problem with navigating to another page. Probably I can't use Frame.Navigate in proper way. I want to navigate to page for example InformationView (which is in Views folder). I did it like this:

Frame.Navigate(typeof(InformationView));

but I have error: Cannot convert from System.Type to System.Uri. I'm new in Windows Phone and don't understand this problem. Anybody can help?

1
It is hard to help without the context of the line, could you had some more code? - Mr Mush
Is your InformationView of type Page? - Kristian Vukusic
It's PhoneApplicationPage - FizzyMustard
PhoneApplicationPage means the project is a Windows Phone Silverlight project. The Frame.Navigate has different signatures in Windows Phone Silverlight and Windows Phone Runtime projects, WP Sliverlight accepts System.Uri while WP Runtime accepts System.Type. Be aware of this when looking for examples or documentation in the internet. - ap3rus

1 Answers

0
votes

As the error said, the Frame.Navigate expects System.Uri containing the relative path to the view you want to navigate, for example like this:

Frame.Navigate(new Uri("Views/InformationView.xaml", UriKind.Relative));