forum

home / developersection / forums / wpf cannot implicitly convert system.drawing.bitmap to media.brush

WPF cannot implicitly convert system.drawing.bitmap to media.brush

Anonymous User 5136 18-Dec-2013

I want to change the background of a button manually in my WPF app.

I have an image imported into my resources and I want to do:

MyButton.Background = MyProject.Properties.Resources.myImage;

But I get the error:

cannot implicitly convert system.drawing.bitmap to media.brush

How can I do this??


wpf wpf 
Updated on 18-Dec-2013

I am a content writter !

Can you answer this question?

Answer

1 Answers

Liked By