Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you navigate to a new page in a metro app?

trying to write a metro app in C# right now. Ran into a problem while trying to navigate to a new page.

<HyperLinkButton NavigateUri="foo.xaml"/> 

doesn't work, as the NavigateUri field doesn't exist. The Windows.Navigate namespace isn't available either, so no luck there. What's the proper way to go to a new page in my app in metro?

like image 566
jjcm Avatar asked Oct 26 '11 02:10

jjcm


People also ask

What is the Metro app called?

The Metro Transit app is a quick way to buy tickets for buses and trains and provides you with tools to ride. The app is powered by Token Transit.

Is there a DC Metro app?

Washington DC Metro and Bus is the region's most popular dedicated DC transit app.

What time does Metro stop running in Houston?

About Houston METRORail hours of operation are 4:30 a.m. to midnight Monday through Thursday, 4:30 a.m. to 2:20 a.m. Friday, 5:30 a.m. to 2:20 a.m. Saturday, and 5:30 a.m. to 11:40 a.m. Sunday.


1 Answers

You can handle the Button control's Click event (in fact, you can use all events with the following code) because Metro's HyperLink button only inherits the ButtonBase class without any special properties or events, such as NavigateUri.

If you want to navigate to another page in your metro app, add a frame in the .xaml page and put this code in the button's event handler:

this.Frame.Navigate("VideoStoryCreator.ComposePage");

like image 103
Arwind Gao Avatar answered Sep 29 '22 06:09

Arwind Gao