Resource

How to set an Image as Background of a Grid in WPF

Soft Dev Jun 16 2009
How to set an Image as Background of a Grid in WPF
    • Like
    • Love It
    • Awesome
    • Interesting
    • It's Okay
    • Thumbs Down
  • 56.5k
  • 0

To set an image as background of a Grid, we can set an image as the Background of the Grid. The following code snippet sets the background of a Grid to an image. The code also sets the opacity of the image.

<Grid.Background>

   <ImageBrush ImageSource="Flower.jpg" Opacity="0.3"/>
</
Grid.Background>