In WPF Prism 7.2 I have followed the IDialogService instructions shown here.
I have a PlotsDialogPanel UserControl with a single ContentControl as shown here:
<UserControl x:Class="PlotModule.Dialogs.Views.PlotsDialogPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
xmlns:local="clr-namespace:PlotModule.Dialogs.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<prism:Dialog.WindowStyle>
<Style TargetType="Window">
<Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
<Setter Property="ResizeMode" Value="CanResizeWithGrip"/>
<Setter Property="ShowInTaskbar" Value="True"/>
</Style>
</prism:Dialog.WindowStyle>
<Grid>
<ContentControl prism:RegionManager.RegionName="PlotsDialogDisplayRegion" />
</Grid>
</UserControl>
In my PlotModule RegisterTypes method I register the dialog:
public void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterDialog<PlotsDialogPanel, PlotsDialogPanelViewModel>();
}
But when the dialog is shown in an event handler it acts as modal, it is always topmost on the parent.
private void MainMenuEventHandler(string inParameter)
{
_DialogService.Show("PlotsDialogPanel", new DialogParameters(), r => {});
}
I can't see what I am doing wrong here, any ideas on why the dialog is behaving as a modal? Everything else works as expected and the dialog shows and closes with the IDialogAware::OnDialogOpened and OnDialogClosed functioning as expected.