Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context seems to be missing #1604

Open
adventiar opened this issue Jul 22, 2023 · 1 comment
Open

Context seems to be missing #1604

adventiar opened this issue Jul 22, 2023 · 1 comment
Labels
doc-enhancement Improve the current content [org] dotnet-maui/tech dotnet-mobile/prod Pri1 High priority, do before Pri2 and Pri3

Comments

@adventiar
Copy link

While reading this page and seeing the examples it is hard to understand the context of the examples. It will say "A page can be modally navigated to by calling the PushModalAsync method on the Navigation property of the current page:" then shows a code example and explains what that code did.

But the constructor of a page is not asynchronous and cannot await methods. So that leaves me unsure as to where this code goes. If the example showed the class with this code in it then I would understand how to use it.

Also it speaks to the "Navigation Property" of the current page. Does each page I create have a navigation property or do I need to add one.

I feel like there is another document I should have read before reading this one but can't find it referenced here.

I was able to understand the root page example as it shows the app class cs file and where the code would go.

I'm certain the explanation is spot on I just don't understand the context so i'm confused.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Jul 22, 2023
@issues-automation issues-automation bot added dotnet-maui/tech dotnet-mobile/prod Pri1 High priority, do before Pri2 and Pri3 labels Jul 22, 2023
@davidbritch davidbritch added the product-question Product usage related questions [org] label Jul 27, 2023
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Jul 27, 2023
@davidbritch davidbritch added doc-enhancement Improve the current content [org] and removed product-question Product usage related questions [org] labels Jul 27, 2023
@davidbritch
Copy link
Contributor

Hi @adventiar

Fair comments and I'll give the doc an update. In the meantime, answers to your questions:

But the constructor of a page is not asynchronous and cannot await methods. So that leaves me unsure as to where this code goes.

Page navigation code would typically go in an asynchronous event handler (e.g. for a button click), or an async override on the page (such as OnAppearing).

Also it speaks to the "Navigation Property" of the current page. Does each page I create have a navigation property or do I need to add one.

Each page has a Navigation property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org] dotnet-maui/tech dotnet-mobile/prod Pri1 High priority, do before Pri2 and Pri3
Projects
None yet
Development

No branches or pull requests

3 participants