Subscribe to our YouTube Channel for more Videos

“Navigation is only supported to relative URIs that are fragments” Error in Windows Phone App


Getting the below error when running your Windows Phone App?

“Navigation is only supported to relative URIs that are fragments, or begin with ‘/’, or which contain ‘;component/’.rnParameter name: uri”

"Navigation is only supported to relative URIs that are fragments" Error in Windows Phone App

The solution to this error is pretty simple. Make sure that the Path used in the generation of the Uri is correct.

For example, you might be using the NavigateUri property. So while generating the Uri, you could have missed the “/” as described.

Uri path = new Uri ("MainPage1.xaml",UriKind.RelativeOrAbsolute);

This could be altered to includes /MainPage1.xaml instead of MainPage1.xaml

Uri path = new Uri ("/MainPage1.xaml",UriKind.RelativeOrAbsolute);
Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.