UWP-019 - Working with Navigation
Description
Many simple apps will not require navigation from one page to another, however when you need it, there are important concepts to understand. This lesson explains how to use the Universal Windows Platform's navigation classes and methods to display different pages to users, pass data from one page to another, and "go back" or "go forward" in the history of pages visited.
Lesson source code: https://github.com/Windows-Readiness/AbsoluteBeginnersWin10/tree/master/UWP-019/UWP-019
Full series source code: https://github.com/Windows-Readiness/AbsoluteBeginnersWin10
PDF: https://aka.ms/absBeginnerWin10pdf
Download
Right click or Alt+Enter to download this episode
- MP3 (22.8 MB)
- Low Quality MP4 (43.3 MB)
- High Quality MP4 (192.0 MB)
- Mid Quality MP4 (119.3 MB)
The Discussion
-
hi Bob. Do you have a link where we can read more about frame theory?
I did not understand well the difference between MyFrame.Navigate and this.Frame.Navigate
Nevermind: I finally understand it with the Hamburguer homework
-
Just FYI, here's a good article (not just the MSDN help):
https://msdn.microsoft.com/en-us/library/windows/apps/mt187344.aspx
-
Hi, I have a silly question :|
When I run the app it has some numbers at the top and I want to take them off but I don't know how nor even what to search for because I don't it's name. Thank you.
-
Hey BaezCrdrm,
just go to App.xaml.cs and remove the following lines from the OnLaunched-function:
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
That's all :) -
@Stefan Griebel: Thanks!
-
Thank You Bob! This lessons are excetional!
-
You are my hero: As soon as you mentioned "Use Case" and navigation between pages i knew I'd found my home.
Thank you. -
Hi Bob!
Thanks for these videos, they are totally great!
At aboud 16 mins in this video you are overriding the OnNavigatedTo method but how do I get to the different methods in a class you can override? You are typing something and then you get the signature for the method like my magic. How did you get to it so fast? I just typed it out but that would be a neat trick to learn.
Thanks again!
-
Hi Bob!
You mentioned that there will be another topic about navigations for phone devices (how to handle physical back button) later on in this video. Would you mind adding a link to that video?
Thanks a lot!
-
Hi,
How to download the project from Github?
Could anyone please help? -
Why does e.Parameter even contain the value that's inside the text box?
I created a second text box, only the value of the first text box was passed to the 3rd page and not the value of the second text box.
How does it decide what gets passed?
-
@barbafish: No, he just copy-pasted it. Did you notice he tried to fix his curly braces. Code snippets won't work that way.
Instead when you IIntellisense to auto complete OnNavigatedTo method there was this line that popped out from nowhere.
base.OnNavigatedTo(e);
It worked just fine. After some binging, it sometimes mentioned about the base class. Don't someone out there want to answer my inquiry?
-
You have added the Three buttons (Home, Back, and Forward) in the MainPage. How are they showing up on all the other pages you are navigating to?
-
Hie Bob !
You are a God Sent Angel...
I would like to thank you on my behalf and the millions who are benefited...
Thanks a ton... and please continue the awesome work you are doing...
And yeah I love when you smile at the last of every video.... :)
Adi
-
@yalematta:Bob mentioned about "Frames". It is the "Frame(MyFrame)" present in the MainPage (which also has that 3 buttons) into which instance of the required view loads into and not the whole app window.
Hope this helped you!
Cheers! Have a nice day!
-
I haven't had any trouble up until now. When I load a blank project and enter the xaml and C# code the MyFrame in the MyFrame.Navigate statement is not in context. I have checked repeatedly and the <Frame Name="MyFrame> in the xmal code is correct. What is going on?
I tried to load the initial project from your download but when I load it all the System: references are unknown. I checked the difference between your sample initial project and a blank project and there were three lines in your sample that weren't in mine. They start with:
Microsoft.ApplictionInsights.WindowsAppInitializer.InitializeAsync(
However, when I enter these lines of code Microsoft.ApplicationInsights is not recognized.
Not sure where I am going wrong. -
Hi Bob!
Thank you for your great and useful videos.
How can I implement the "this.Frame.Navigate(...)" in Visual Basic UWP?
I have tried writing "Me.Frame.Navigate(typeof(SecondPage))" but I get the following error message: "'SecondPage' is a class type and cannot be used as an expression".
What I'm trying to do is what "SecondPage.Show()" would do in VB WinForms.
I would be grateful if you could reply.
Thank you :) -
Coolest development tutorial ever! Seriously, you make it seem so easy!