title: Custom UserControl (button) in XAML with parameters
body: <p>I'd like to make a UserControl that I can reuse for the various buttons in my application. Is there a way to pass parameters to UserControls through XAML? Most of the buttons in my app will consist of two rectangles (one within the other) with some user specified colors. It will also possibly have an image. I'd like it to behave something like this this:</p>
  
  <pre><code>&lt;Controls:MyCustomButton MyVarColor1="&lt;hard coded color here&gt;" MyVarIconUrl="&lt;null if no icon or otherwise some URI&gt;" MyVarIconX="&lt;x coordinate of icon within button&gt;" etc etc&gt;
  </code></pre>
  
  <p>Then inside the button I would like to be able to use these values inside the XAML (assign the IconUrl to the source of the Icon, etc, etc. </p>
  
  <p>Am I just thinking about this the wrong way or is there a way to do this? My purpose is to have less XAML code for all my buttons.</p>
  
  <p>Thanks!</p>