ModalDialog Class
Control to implement a modal dialog for displaying User Controls.
1. Add a namespace attribute to the root element of the markup file it is to be used in:
xmlns:cc="clr-namespace:Common.Wpf.Controls;assembly=Common.Wpf.Controls"
2. Define the control setting the ZIndex:
<cc:ModalDialog Panel.ZIndex="1" IsOpen="{Binding IsOpen}">
<ContentControl Content="{Binding CurrentModalViewModel}"/>
</cc:ModalDialog>
3. In the
ViewModel create the properties for binding:
public ViewModelBase? CurrentModalViewModel => _modalNavigationStore.CurrentViewModel;
public bool IsOpen => _modalNavigationStore.IsOpen;
ModalDialog | Initializes a new instance of the ModalDialog class |
IsOpen | Gets or sets the is open indicator. |