title: How to add grid background Image in c#
body: <p>I am trying to change images source or image background in c# when a button is click with xaml design UI.    </p>
  
  <pre><code>&lt;Grid x:Name="gridimage"&gt;
              &lt;Image x:Name="Image" stretch="Fill"/&gt;
          &lt;/Grid&gt;
  
  private void Button1_click(object sender, RoutedEventArgs e)
      {
       // NOT WORKING FOR ME
           gridimage.Source = new BitmapImage (new Uri("location"));
           gridimage.Background = ?
       }
  </code></pre>