title: Problems with WPF command key bindings
body: <p>A project i'm working on requires a shortcut key to access a save dialog to dump the contents of a rich text box element into a file.</p>
  
  <p>My keybinding and command binding are being done in XAML but the code behind is what i think is messing up.</p>
  
  <p>My key and command binding is set up like so.</p>
  
  <pre><code>&lt;KeyBinding Command="local:customCommands.saveFile" Key="S" Modifiers="Ctrl"/&gt;
  ...
  &lt;CommandBinding Command="local:customCommands.saveFile" Executed="launchSaveDialog"/&gt;
  </code></pre>
  
  <p>And this is the code behind for the WPF window</p>
  
  <pre><code>private void launchSaveDialog(object sender, ExecutedRoutedEventArgs e)
      {
          SaveFileDialog dlg = new SaveFileDialog();
          dlg.Filter = "Rich Text format(*.rtf)|*.rtf|";
          dlg.DefaultExt = ".rtf";
          dlg.OverwritePrompt = true;
          if (dlg.ShowDialog() == true)
          {
              FileStream fileStream = new FileStream(dlg.FileName, FileMode.Create);
              TextRange range = new TextRange(RTB.Document.ContentStart, RTB.Document.ContentEnd);
              range.Save(fileStream, DataFormats.Rtf);
          }
      }
  </code></pre>
  
  <p>The save dialog doesn't show even though Ctrl+S is pressed.
  If it helps, the program runs full screen.</p>
  
  <p>Also, is there a way of running a Winforms save dialog inside of the WPF app as a separate window</p>