title: How can you programatically bind a Double to a WidthProperty?
body: <p>Can a <code>double</code> or <code>int</code> be bound to a <code>WidthProperty</code> of an element such as a <code>Button</code> or <code>Border</code>?</p>
  
  <p>I have something like this but it does not seem to work. Maybe it's not the <code>Value</code> property that the binding needs.</p>
  
  <pre><code>double changedNum = 3;
  double myWidth = 100 * changedNum;
  border1.SetBinding(WidthProperty, new Binding("Value") { Source = myWidth });
  </code></pre>
  
  <p><em>Update</em></p>
  
  <p>I have posted an answer to my question. My goal was to bind an existing slider value and multiply or divide by a double. Then have that value set as binding for another object's WidthProperty. Solution is below.</p>