var brush = new ImageBrush(); brush.ImageSource = new BitmapImage(new Uri("Images/myImage.png", UriKind.Relative)); button1.Background = brush;
var brush = new ImageBrush(); brush.ImageSource = new BitmapImage(new Uri("Images/myImage.png", UriKind.Relative)); button1.Background = brush;