title: How to create child window by the context menu of page in wpf?
body: <p>I have a context menu what is triggered by each list item of listbox.
  And, I want to create child window when I select a context menu as below:</p>
  
  <p><strong>xaml</strong></p>
  
  <pre><code>&lt;ListBox.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;StackPanel Width="150" Orientation="Vertical" Margin="15, 5, 15, 5"&gt;
              &lt;StackPanel.ContextMenu&gt;
                  &lt;ContextMenu FontSize="16"&gt;
                      &lt;MenuItem Header="{x:Static localRes:Resources.ID_STRING_SETTING}" Margin="5" Command="Setting_Click"/&gt;
                  &lt;/ContextMenu&gt;
  </code></pre>
  
  <p>It is already a sub page of main window.
  So, I can't find a way how to set <code>MainWindow</code> instance as the owner of new window.</p>
  
  <p><strong>Behind Code</strong></p>
  
  <pre><code>    private void Setting_Click(object sender, RoutedEventArgs e)
      {
          SettingWindow SettingWindow = new SettingWindow();
          SettingWindow.Owner = /* I do not know how to do */
          SettingWindow.Show();
      }
  </code></pre>