I wanted to ask how to change a background image on a button created with Expression Blend 3, I know normal butto开发者_如何学JAVAns in VS have a BackgroundImage property, but I can't seem to find it on this project, the idea is to change the background image when the button is clicked but I can't seem to find how to do it.
The only property that could help me is the Background property but it doesn't state anything about an image itself or anything like that, not even something to change the color.
Thanks for your time.
Regards
PS: This project is done in C#
Well I found the answer so I'll post it here in case someone ever has the same question:
ImageBrush brush = new ImageBrush(new BitmapImage(new Uri("pack://siteoforigin:,,,/images/yourimage.gif")));
brush.Stretch = Stretch.Uniform;
btn.Background = brush;
I found the answer here: link text
精彩评论