Hola tengo el siguiente codigo
private
void
button1_Click(object
sender, RoutedEventArgs
e)
{
ImageBrush
berriesBrush = new
ImageBrush();
try
{
berriesBrush.ImageSource =
new
BitmapImage(new
Uri(@"pic\muestra.jpg",
UriKind.Relative));
}
catch
(Exception
ex)
{
MessageBox.Show(ex.ToString());
}
this.button1.Background
= berriesBrush;
}
se supone que deberia rellenar el boton con una imagen, al hacerle clic pero no funciona, esto ya lo habia podido hacer en VB, pero no se que esta pasando aqui.
Muchas gracias por sus respuestas.