title: wpf custom button best approach
body: <p>I want to create a custom <code>Button</code> inside WPF. Of course, the button will be an UserControl and it will contain many visual elements (like stroke, highlight, shadow, glow, images etc.).</p>
  
  <p>The problem is that if I use DependencyProperties and bind them in XAML I won't be able to see the result at DesignTime (I've tried to implement IsInDesignMode method but for a certain reason that I can't understand my VS just crashes when I use this method on UserControls, otherwise it works just fine) and this is definitely not good. </p>
  
  <p>So I am thinking about not using XAML at all and do all my work in the code behind. </p>
  
  <p>What do you guys think? </p>