title: XAML PasswordBox throwing InvalidCastException during initialisation
body: <p>I am working on a Windows Forms application in C# with XAML.</p>
  
  <p>When a class is loaded that contains a PasswordBox, the application always crashes with a System.Windows.Markup.XamlParseException at the last Parameter of the PasswordBox with an inner Exception: InvalidCastException: Unable to cast object of type 'System.Windows.Media.Color' to type 'System.Windows.Style'.
  This always occurs, even if I am using the simplest of PasswordBoxes</p>
  
  <pre><code>&lt;PasswordBox x:Name"passwordBox" Height="30" Width="300"/&gt;
  </code></pre>
  
  <p>The XamlParseException would, in this example, point to the Width attribute.</p>
  
  <p>Anybody know where this error could be coming from or at least how to better debug it? </p>