Monday, 26 August 2013

Can't navigate to file in same folder using relative path?

Can't navigate to file in same folder using relative path?

I am absolutely confounded by this seemingly simple error. I can't
navigate to a file in the same folder using this code
NavigationService.Navigate(new Uri("Rotate.xaml", UriKind.Relative));
I also tried
NavigationService.Navigate(new Uri("/Rotate.xaml", UriKind.Relative));
However when I move the file I'm working on to the main project folder and
then use this navigation code
NavigationService.Navigate(new Uri("/Pages/Rotate.xaml", UriKind.Relative));
it works! Why can't I navigate to the file when I am in the same folder
but I can when I'm in the main project folder?

To give you a better idea here is the view of my solution explorer. This
view corresponds to the first two situations. In the thirdsituation I have
the PictureSelect.xaml file outside of the Pages folder and try to
navigate to the Rotate.Xaml file.

No comments:

Post a Comment