title: How can I bind a Slider value to a Rectable height in Silverlight (works in WPF)?
body: <p>This code works in WPF but not in Silverlight.</p>
  
  <p>Are there any workarounds in Silverlight to enable to me to bind a slider value to element heights? What are the limitations of Silverlight here?</p>
  
  <h2>ANSWER:</h2>
  
  <p>Thanks Peter for solving this, for others: here is <a href="http://tanguay.info/web/index.php?pg=codeExamples&amp;id=67" rel="nofollow noreferrer">the solution with online demo and downloadable code</a>.</p>
  
  <pre><code>&lt;UserControl x:Class="Second12.Page"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
      Width="300" Height="200"&gt;
      &lt;Grid Background="Tan"&gt;
          &lt;StackPanel&gt;
              &lt;Canvas&gt;
                  &lt;Border Background="#2200ffff" 
              Canvas.Left="40" 
              Canvas.Top="30" 
              CornerRadius="5" 
              BorderBrush="Brown"
              BorderThickness="1"&gt;
                      &lt;Rectangle 
              Height="{Binding ElementName=theSlider, Path=Value}"
              Width="50"/&gt;
                  &lt;/Border&gt;
              &lt;/Canvas&gt;
          &lt;/StackPanel&gt;
          &lt;Slider Name="theSlider" HorizontalAlignment="Left" Width="200" Cursor="Hand"/&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>