Apply background image in windows phone 7 application
In this post I am going show how we can apply an image in your app background. This we can do in XAML and also using C# code.
If we want to set image using XAML, it is easy. Just we need to set background for top parent element, in my Demo Grid (default) is top parent element. So, I am applying background image to that.
Just add the below code after <Grid> tag
Some time we need to change the background using your code. For example if the user selected one movie we need set that film image we need to show in background.
In my example I am use PhotoChooserTask user to select his image for background.
For this we need to do flowing things
*Note: – Please not apply background for grid
// create the PhotoChooserTask object with page scope.
Then in Constructor just add the below highlighted code
In button click event I am just showing PhotoChooserTask
In photoChooserTask_Completed event
I hope, it will be helpful for beginners!!!!!
Enjoy while coding..!