ImageBrush myBrush = new ImageBrush();
myBrush.ImageSource = new BitmapImage
(new Uri(@"pack://application:,,,/Resources;component/Images/x.jpg"));
grid.Background = myBrush;
you create a new grid and put the image on it, But you cannot see that grid cuz he is noot a part of the UI objects