Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Open a Page in a Windows 8 App
WhatsApp
Mahesh Chand
12y
12.3k
0
0
100
Article
Navigation in a Windows Store or Windows Store app is achieved using a Frame.
A Frame can host a new page that you want to open in the main or root page and then the Frame can be displayed in the main page.
I have a page called BasicPage1 and I want to open it on a button click event handler.
The following code snippet creates a Frame and navigates to the page:
// Create a Frame for the page
var rootFrame = new Frame();
rootFrame.Navigate(typeof(BasicPage1));
Then I set the content of the current window to the new Frame I just created, as in:
// Place the frame in the current Window and activate it
Window.Current.Content = rootFrame;
Window.Current.Activate();
Frame
Frame.Navigate
Page
Window.Current
Window.Current.Activate
Window.Current.Content
Windows Store app
Up Next
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.
Membership not found