If I do this inside a User Control:
NavigationService.Navigate(new Uri(\"/Alliance.xaml\", UriKind.Relative));
it says this error:
I normally use an EventHandler. Example: in your user control, define something like
public event EventHandler goToThatPage;
that you will call in your control foe example like this:
goToThatPage(this, new EventArgs());
Then in the constructor of your MainPage.xaml.cs (if the user control is contained there) you will define:
uxControlName.goToThatPage+= new EventHandler(ControlGoToThatPage);
and somewhere in your MainPage.xaml.cs you finaly declare the action to be done:
void ControlGoToThatPage(object sender, EventArgs e)
{
this.NavigationService.Navigate(new Uri("/Pages/ThatPage.xaml", UriKind.Relative));
}