71 views
in GUI Development by
Hello,

Is there a way to InvalidateViewState() of a Dialog after Dismissing a dialog presented ontop of the original one?

I was thinking about overriding the method Done() in the dialog i dissmissed  including Owner.InvalidateViewState() in it, so the underlaing dialog gets updated?

Thanks.

1 Answer

+1 vote
by
 
Best answer

Hello Riccardo,

the Done() method is not allowed to access foreign objects. Therefore this approach will not work.

Anyway, whether a component actually acts as dialog or not, is reflected in the Dialog state of this component (See also Handle the view state of the Dialog). This state changes when the component is presented and it changes again when the component is dismissed. You could thus implement in the corresponding component the method UpdateViewState() and react there on the alternation of the Dialog state. This could include the invocation of Owner.InvalidateViewState().

Please note, Owner may become null. Therefore add if-condition to test whether Owner is valid before invoking InvalidateViewState().

I hope it helps you further.

Best regards

Paul Banach

by
Thanks Paul. I'll try this approach.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...