title: How can I base a style on a default control's style?
body: <p>We're writing a custom subclass of TextBox where we need to change only some basic parts of the style.  Now we know when you subclass <code>Control</code>, normally you're supposed to change the metadata like this...</p>
  
  <pre><code>public class EnhancedTextBox : TextBox
  {
      static EnhancedTextBox()
      {
          // Commenting this line out lets this use the default TextBox style.
          DefaultStyleKeyProperty.OverrideMetadata(
              typeof(EnhancedTextBox),
              new FrameworkPropertyMetadata(typeof(EnhancedTextBox)));
      }
  }
  </code></pre>
  
  <p>This changes the key used for that subclass type to be the type itself, which means it no longer gets the default TextBox style.  No biggie... we just comment that line out and it again works since the key is still set to the value used by TextBox directly.</p>
  
  <p>However, we're wondering if we <em>did</em> want to change a few things in the style, but not the entire style, we could simply create a new style and set its <code>BasedOn</code> property... but what do we set there?  We don't want to have to pull out the XAML manually and create a new style, give it a key, then use a StaticResource, but we haven't found out what we could set there to say 'This is based on the TextBox style.</p>
  
  <p>I'm hoping its something simple but again, we haven't found it.  Can anyone help?</p>