Hi,
I am popping up a modal message that I want the user to acknowledge by pressing on a close button inside the popup.
If they accidently press the back button on the device the modal popup is closed.
Is there any way to stop this from happening?
Thanks
Anthony
5 Answers, 1 is accepted
I understand the scenario you have, still, this could not be handled by the Popup control as it is more of an application logic. I'd suggest you check the following resources on how to handle the device back button click:
https://forums.xamarin.com/discussion/117782/disable-device-back-button
https://forums.xamarin.com/discussion/113715/is-there-a-way-to-override-a-back-button-press-on-android-and-ios-in-xamarin-forms#latest
I hope those could be helpful. Let me know if you have any concrete questions on RadPopup related to the implementation you choose.
Regards,
Yana
Progress Telerik

Hi,
Thanks for your suggestions. I worked around this by wiring up the Popup PropertyChanged event. Inside this I check if IsOpen is set to false and if the user has not pressed the close button in the Popup I set IsOpen back to true which forces the Popup to show again.
Thanks
Anthony
Indeed, that's another option that didn't come to my mind.
Anyway, I am glad to hear you've managed to resolve it.
Regards,
Yana
Progress Telerik

Hi, there is still no out of the box support for preventing popup closing on back button event?
Thanks
Hello Gabriele,
We consider this is a functionality that shouldn't be handled by RadPopup control. In general, our controls shouldn't mess up with how device buttons will react on certain actions.
This is an application logic and in the previous posts you can find suggestions on how you can implement it.
Let me know if I can help with anything else.
Regards,
Yana
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.