I'm trying to start a Page using a function always. How could I do that? Because the first time works perfectly but the second it does't work.
Here is some content about my app.
- homePage
- ScanQRPage
So, basically I have a button in homePage that redirect to ScanQRPage. And there I have this constructor
public ScanQRPage()
{
InitializeComponent();
btnScannerQR.IsVisible = true;
Connectivity.ConnectivityChanged = ConnectivityChangedHandler;
Scanner();
}
And what I need is that every time the user go to this page (ScanQRPage), the Scanner function start.
How could I do that?
Thank you very much!
CodePudding user response:
use OnAppearing
protected override void OnAppearing()
{
Scanner();
}