📄️ Modal Reference
When you open a modal you can capture a reference to it and await the result of that modal. This is useful when you want to perform an action when a modal is closed or cancelled.
📄️ Passing Data
Data can be passed to a modal by using the ModalParameters object. The items you add to this collection must match the parameters defined on the component being displayed in the modal. Let's look at an example.
📄️ Returning Data
Data can be returned from a modal by using the ModalResult.Data property. You can return simple strings as well as complex objects.
📄️ Closing Programmatically
While most modals will be dismissed by a user via buttons on the UI, sometimes you may want to dismiss a modal programmatically. An example of such a usecase is opening a modal with a loading spinner while data is being loaded from a UI or other long running process.
📄️ Multiple Modals
It's possible to show multiple modals at the same time, however, each new modal needs to be shown from the currently active modal.