Every Windows Phone developer might be familiar with the NavigationService and the way a URI is used to navigate to the specified content, i.e.:
NavigationService.Navigate(new Uri("/Views/DetailsPage.xaml?selectedItem=" + selectedItem.ID, UriKind.Relative));
But is there an explanation for WHY it is this way?
The issues about the safeness when using it are:
- If you rename/move/refactor a class, the URI won't work anymore. Same with properties.
- You have absolutely no validation if the specified Page or the Properties exist
- Even though this is the standard mechanism for page navigation, why doesn't the IDE at least validate relative URIs to check if the classes and properties fit?
- Why doesn't anyone seem to care?
Compared to e.g. Android and iOS, both provide at least more type safety, or am I missing something here?