Add a link to another page on Windows Phone 7

Greetings from rainy Thailand, where I am on holiday. And on rainy days like today I’m learning Silverlight on the Windows Phone 7 platform.

If you need to link to another page in your Silverlight application on Windows Phone 7, the easiest way is to use a HyperlinkButton, like so:

 <HyperlinkButton Content="image page" NavigateUri="/ImagePage.xaml" />

It took me a bit of trial and error to realise that I needed to put a “/” at the start of the NavigateUri. MSDN’s help page didn’t have a code sample either.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s