title: Setting Full Width to WPF Image in C#
body: <p>I'm trying to reduce my window size to 70%, in which there will be an image that will be stretched for 100% width and 30% (below the image) height, in which there is a stack panel containing some controls.</p>
  
  <pre><code>&lt;Window x:Class="CapManageR.Video"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Video" Height="500" Width="1000"
      Loaded="Window_Loaded"  Closing="Window_Closing"&gt;
  
    &lt;Grid Name="grid1"&gt;
  
      &lt;Image Source="c://a.png"   HorizontalAlignment="Stretch" Height="700"&gt;&lt;/Image&gt;
      &lt;StackPanel Height="300" HorizontalAlignment="Stretch"&gt;
        &lt;Slider x:Name="horizSlider" 
                  Minimum="0"
                  Maximum="100"
                  Value="50"
                  LargeChange="10"
                  SmallChange="1"
                  Width="200"
                  Margin="186,356,406,51"
                  PreviewMouseUp="horizSlider_PreviewMouseUp"/&gt;
      &lt;/StackPanel&gt;
  
    &lt;/Grid&gt;
  
  &lt;/Window&gt;
  </code></pre>
  
  <p>I don't really know how to solve this. The above is my code so far. It is not really working. Can someone help so it will be proportional even upon resizing?</p>