title: Call PrintDialog.ShowDialog() in a WPF UserControl which is hosted in WinForms Application
body: <p>I have a WPF UserControl which use the System.Windows.Controls.PrintDialog:</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;UserControl x:Class="WpfControlLibrary1.UserControl1"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;    
     &lt;Button Click="Button_Click"/&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>CodeBehind:</p>
  
  <pre><code>namespace WpfControlLibrary1
  {
     using System.Windows;
     using System.Windows.Controls;
  
     public partial class UserControl1 : UserControl
     {
        public UserControl1()
        {
           InitializeComponent();
        }
  
        private void Button_Click(object sender, RoutedEventArgs e)
        {
           var printer = new PrintDialog();
           printer.ShowDialog();
        }
     }
  }
  </code></pre>
  
  <p>If I use now this UserControl in a WPF Appplication the PrintDialog-Windows appears as modal dialog. (Like described in msdn)</p>
  
  <p>But if I use the UserControl in a Wondows-Forms application, the dialog appears as a NON-Modal dialog.</p>
  
  <p>Anyone an idea how I can call the PrintDialog as modal dialog when I host the usercontrol in a Windows-Forms application?</p>
  
  <p>Thanking you in anticipation
  rhe1980</p>