title: how to bind the Height property to a variable in c# code wpf
body: <p>I am trying to bind a Height property of a rectangle depending on a variable in a c# code .I Wrote this code in the XML  </p>
  
  <pre><code>&lt;Rectangle x:Name="H1" Fill="Blue" HorizontalAlignment="Left" Height="{Binding Path=H1 }"  Margin="29,83,0,0" Stroke="Black" VerticalAlignment="Top" Width="149"/&gt;
  </code></pre>
  
  <p>and in the c# code in the window load event : </p>
  
  <pre><code>private void Window_Loaded(object sender, RoutedEventArgs e)
  {
      int H1 = 50;
  }
  </code></pre>
  
  <p>but there is no action and the height is 0,and the intelicense says to me that "H1" is never used 
  ,Where is the  problem ? </p>