title: WPF xaml parse exception when using derived style from default one
body: <p>Hello my question is about the source of a WPF XAML parse exception and what are the ways to catch it.So far despite adding all exceptions from the settings i can't catch it.</p>
  
  <p>It crashes when i try to derive a style from the default one.</p>
  
  <pre><code> Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll 
      Additional information: 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '13' and line position '22'.
     If there is a handler for thisenter code here exception, the program may be safely continued.
  </code></pre>
  
  <p>The place where the styles are applied:</p>
  
  <pre><code> &lt;Grid Margin="0,0,1,51"&gt;
              &lt;StackPanel Name="tbPanel" Margin="80,8,98,90" &gt;
                  &lt;TextBox  Name="txtInput0" &gt;&lt;/TextBox&gt;
                  &lt;TextBox Name="txtOutput0" Style="{StaticResource Custom}" &gt;&lt;/TextBox&gt;
              &lt;/StackPanel&gt;
          &lt;/Grid&gt;
  </code></pre>
  
  <p>The resources section:</p>
  
  <pre><code>&lt;Window.Resources&gt;
          &lt;Style TargetType="TextBox"&gt;
              &lt;Setter Property="Background" Value="DarkMagenta"&gt;&lt;/Setter&gt;
          &lt;/Style&gt;
          &lt;Style TargetType="TextBox" x:Key="Custom" BasedOn="{StaticResource {x:Type TextBox}}"&gt;
              &lt;Setter Property="Background" Value="Beige"&gt;&lt;/Setter&gt;
          &lt;/Style&gt;
  
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>I have tried to no avail to catch the exception.I added all exceptions from Exception settings and added Try-Catch blocks in the main window but still nothing.</p>
  
  <pre><code>  public MainWindow()
          {
              try
              {
                  InitializeComponent();
              }
              catch (Exception ex)
              {
                  Console.WriteLine(ex.InnerException.Message);
              }
          }
  </code></pre>
  
  <p>PS: In the xaml designer the two textboxes have different colors despite the error.</p>