Background image Windows Phone 7
- by Xavier
I have a little question, I want to change the background of my application with C#.
I tried this code :
var app = Application.Current as App;
var imageBrush = new ImageBrush
{
ImageSource = new BitmapImage(new Uri(imageName, UriKind.Relative))
};
app.RootFrame.Background = imageBrush;
But it doesn't work, the background is dark.. I tried to do :
app.RootFrame.Background = new SolidColorBrush(Colors.Blue);
And it works well. So I don't understand where is the problem, my image is 480*800 px and I set Build Action to Content and Copy to Output Directory to Copy if newer .
Thanks for all