0
votes

I create a class library portable for universal app in visual studio 2013

i add new xaml file,rename it to page1.xaml and put some xml control in it.

after compiled the project, i added this library to my windows phone 8.1 project

now i want to navigate to page1.xmal in my library and load the page. how can i do it?

i try this code and an exception occurred

await Windows.System.Launcher.LaunchUriAsync(new Uri("/mylibrary/page1.xaml"));

An exception of type 'System.UriFormatException' occurred in SYSTEM.NI.DLL but was not handled in user code

Additional information: Invalid URI: The format of the URI could not be determined.

1

1 Answers

0
votes

You can simply use the NavigateTo method, using the page's type as parameter:

Frame.Navigate(typeof(page1));

See this MSDN page for details about page navigation!