title: binding to width property in code behind
body: <p>I have a situation where I need to create View box with one button. The xaml for this is as below: Please observe Width property of viewbox. The Width should be increased/decreased according to a slider bar(moving to right increases it, to left decreases it). As listed below I know how to do it in xaml and it works fine. But my requirement is to be able to create viewbox in code behind and assign it the properties.</p>
  
  <pre><code> &lt;WrapPanel x:Name="_wrpImageButtons" Grid.IsSharedSizeScope="True"
             ScrollViewer.CanContentScroll="True" d:LayoutOverrides="Height" 
             Margin="5"&gt;
      &lt;Viewbox x:Name="_ScaleButton" 
               Width="{Binding Value, ElementName=ZoomSlider}" Stretch="Fill"&gt;
           &lt;CustomButton:_uscVCARSImagesButton x:Name="_btnImage1"/&gt;
      &lt;/Viewbox&gt;
   &lt;/WrapPanel&gt;
  </code></pre>
  
  <p>Thanks.</p>