I have implemented Prism IDialogWindow on a Telerik RadWindow (WPF). The property Owner (type Window) of IDialogWindow hides Owner of RadWindow (which is of type ContentControl). The only way I found to get the desired modal behavior when using ShowDialog() is to set both properties (this.Owner and base.Owner) to parent window in constructor method. Is this the only resp. correct way?
First I tried setting this.Owner only. But then the dialog does not behave modal. Then I found out that base.Owner is of another type of this.Owner and was not set to parent window. At last I set both properties to parent window.
public partial class SampleDialogWindow : RadWindow, IDialogWindow
{
public SampleDialogWindow()
{
InitializeComponent();
this.Closing += OnClosing;
this.Closed += OnClosed;
this.Owner = Application.Current.MainWindow!;
base.Owner = Application.Current.MainWindow!;
}
// IDialogWindow Impl.
public new Window Owner { get; set; }
}