I am using Rg Plugin popup for popup in Xamarin Forms application. I would like to disallow user from closing this popup. After some time, application will close this popup. Is it possible?
Why I need this: When user opens application for the first time, I would like to show usual start page and on top of it popup. Both are visible: in the middle there is popup and around it usual start page with grey overlay. In popup progress bar will be displayed while fetching data from server. User should not be able to close this popup. When fetching data is over, I would like to refresh start page and close this modal.
As Dinesh kumar pointed out, 2 things need to be done - to disallow clicking on background and to disallow back button:
public MyPopup()
{
InitializeComponent();
CloseWhenBackgroundIsClicked = false;
}
protected override bool OnBackButtonPressed()
{
return true; // Disable back button
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With