title: WPF Rectangle ImageSource
body: <p>i couldnt fill rectangle object with image.</p>
  
  <pre><code>ImageBrush ib = new ImageBrush();
  BitmapImage bmi = new BitmapImage(new Uri(@"/WpfImageApp;component/Images/Penguins.jpg", UriKind.Relative));
  ib.ImageSource = bmi;
  body.Fill = ib;
  </code></pre>
  
  <p>body is Rectangle object and when i run this code, there is only black screen on window. I also couldnt see my other controllers(like buttons). any solution?</p>