1
Let’s assume that I have 3 screens in Xaml and I use the SterDetailPage and Navigationpage to navigate between these screens back and forth. Page A -> Page B -> Page C -> ...
I use Pushasync to do the navigation. So far so good...
I implemented it in two ways:
1 - I create a new instance of each screen every time in the navigations:
await Navigation.PushAsync(new Views.PageA());
2 - I create a static property (in the App View) for each screen and use this property to navigate:
public static Views.PageA PageA
{
get
{
if (_pageA == null)
{
_pageA = new Views.PageA();
}
return _pageA =;
}
}
await Navigation.PushAsync(App.PageA);
Is there another way to do this? Static use or create a new instance every time?
My concern is about performance and memory usage.
Please leave your answer with your opinion and if you can leave some code I appreciate.
Angelo, it just worked this way: Md. Detail = new Navigationpage(new Novapagina());
– Fabio Silva Lima
Show! , the secret is in Detail with Navigationpage
– Angelo Belchior