Share via

Application or app?

Dani_S 5,581 Reputation points
2024-03-04T13:55:19.1533333+00:00

Hi,

More question:

Application.Current.MainPage.Navigation.PushAsync(new MainPage(context.Item as Schedule));

Or App.Current.MainPage.Navigation.PushAsync(new MainPage(context.Item as Schedule));

Thanks,

Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

Answer accepted by question author

Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,166 Reputation points Microsoft External Staff
2024-03-05T01:37:12.6766667+00:00

Hello,

The functionality of these two classes is the same, as the App actually points to a App.xaml.cs in the MAUI project, and this class inherits from Application.

public partial class App : Application

Therefore, if you change the App here to something else, you can still call it. This is the same as calling Application directly.

Best Regards,

Alec Liu.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.