title: Adding password box to input dialog in Mahapps Metro?
body: <p>I have a sample code for an input dialog that works perfectly in Mahapps Metro and only I need to change the text field to a password field. The actual dialog is found in this <a href="https://github.com/MahApps/MahApps.Metro/blob/master/MahApps.Metro/Controls/Dialogs/InputDialog.cs" rel="nofollow">cs</a> file and <a href="https://github.com/MahApps/MahApps.Metro/blob/master/MahApps.Metro/Themes/Dialogs/InputDialog.xaml" rel="nofollow">xaml</a> file.</p>
  
  <p>That sounds simple enough, all I have to do is pretty much just modify the xaml file With a password box, but keep everything else the same. Only problem is, to activate the dialog box a method is called in DialogManager called ShowInputAsync() that instantiates the InputDialog. Problem is, the constructor is internal. </p>
  
  <pre><code>namespace MahApps.Metro.Controls.Dialogs
  {
      public partial class InputDialog : BaseMetroDialog
      {
          internal InputDialog(MetroWindow parentWindow, MetroDialogSettings settings)
              : base(parentWindow, settings)
          {
              InitializeComponent();
          }
  </code></pre>
  
  <p>The code from the DialogManager</p>
  
  <pre><code>using MahApps.Metro.Controls;
  using MahApps.Metro.Controls.Dialogs;
  
  namespace order
  {
      public static class DialogManager
      {
          public static Task&lt;string&gt; ShowInputAsync(this MetroWindow window, string title, string message, MetroDialogSettings settings = null)
          {
              window.Dispatcher.VerifyAccess();
              return HandleOverlayOnShow(settings, window).ContinueWith(z =&gt;
              {
                  return (Task&lt;string&gt;)window.Dispatcher.Invoke(new Func&lt;Task&lt;string&gt;&gt;(() =&gt;
                  {
                      if (settings == null)
                          settings = window.MetroDialogOptions;
  
                      //create the dialog control
                      InputDialog dialog = new InputDialog(window, settings); // this is where I need my own dialog created (xaml/cs files)
  </code></pre>
  
  <p>Is there a way to re-use the code, or do I have to just Write all this plumbing from scratch?</p>