UserPopup : Possibility to intercept Hide with AutoHide true?

0
0

Hello,

I would like to know if there is a possibility to intercept a UserPopup going to Hide.

When the User clicks outside the UserPopup, I would like to perform a check (was the save button pressed ?) and eventualy cancel the hidding.

Something similar to Formclosing.

 

Best Regards.

 

  • You must to post comments
0
0

Luca,

The Closed event is too late. The user popup is already closed.

Furthermore Userpopup.Closed parameter e is of simple type EventArgs, so there is no chance to set e.Cancel = true, like usualy done when using closing.

What I would like to achieve is to prohibit closing/hiding of the userpopup if a save button inside the popup has not been executed when changes are pending.

Otherwise, if you accidentaly click away and have the popup to hide, you loose the changes.

If I set autohide to false, I loose the possibility for the user to (most of the time) click away of the popup (because of no changes), which would be annoying.

I checked and tried other events, but it seems to me that the feature is missing.

Best regards.

  • You must to post comments
0
0

Did you try the UserPopup.Closed event?

You can also do popup.ShowPopup(…, (p) => {  // closed code… });

or (not sure if already released)

await popup.ShowPopupAsync();

// code runs after the popup is closed.

 

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.