title: How do I modify ONLY the right (or left, top, bottom) value of a WPF control's Margin property?
body: <p>This is quite easy to do from code-behind:</p>
  
  <pre><code>var button = new Button();
  var margin = button.Margin;
  margin.Right = 10;
  button.Margin = margin;
  </code></pre>
  
  <p>In XAML, however, I'm limited to the following:</p>
  
  <pre><code>&lt;Button Margin="0,0,10,0" /&gt;
  </code></pre>
  
  <p>The problem with this is that now I've potentially overwritten the other margin values (i.e. left, top, bottom) by setting them to zero).</p>
  
  <p>Is there any way to have XAML like the following?</p>
  
  <pre><code>&lt;Button MarginRight="10" /&gt;
  </code></pre>