Hello,
Hi, I am trying to find a way to run a method after a contentpage is showing on the screen.
Lifecycle functions that are triggered after a page is fully loaded are not yet included in MAUI.
In fact, there is a Loaded event in MAUI that fires the moment your control is creating.
Occurs when a VisualElement has been constructed and added to the object tree. This event may occur before the VisualElement has been measured so should not be relied on for size information.
You could use this event as the following code:
YouControl.Loaded += (s, e) => { };
Please refer to VisualElement.Loaded Event to get more details.
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.