Hello Karijn Wessing,
to achieve this functionality you will need to manage two separate dialog stacks.
In most usual application cases, the dialogs are presented in context of the Application component (in context of the root object). The dialogs build so a single dialog stack. When a new dialog is presented, the preceding dialog is overlaid by it. When the user dismisses the dialog the previous dialog on the stack is exposed again.
The simplest solution could be to present MeasurementReadyScreen in context of MeasurementScreen. When ShutdownScreen is presented it overlaps MeasurementScreen. If during this time a MeasurementReadyScreen is presented, this dialog appears then inside MeasurementScreen. When the user dismisses the ShutdownScreen, the underlying MeasurementScreen with its nested MeasurementReadyScreen is exposed again.
This approach may have a disadvantage: when a dialog is presented inside another dialog, the superior dialog can still react to user inputs. It means, while MeasurementReadyScreen is visible, the user could eventually reach and activate buttons, etc. inside the superior MeasurementScreen dialog. Also, the area of the superior dialog limits the visibility of the nested dialog. It means, when MeasurementReadyScreen is larger than MeasurementScreen dialog, it will not appear completely on the screen.
To overcome the mentioned restrictions, the following, more complex approach can be used:
1. Add a new component to your project. Name it e.g. MeasurementScreenGroup.
2. Adjust the size of the MeasurementScreenGroup to correspond to the display size (to the size of the Application component).
3. At the initialisation time of the Application component present MeasurementScreenGroup as a dialog. One approach to achieve this is to implement the PresentDialog() invocation inside the Init method of the Application component.
4. The MeasurementScreen and MeasurementReadyScreen dialogs should be presented inside (in context of) the MeasurementScreenGroup component.
5. The ShutdownScreen should be presented in context of the Application component.
I hope it helps you further. See also Take a closer look at the Dialog functionality.
Best regards
Paul Banach