Just wondering if anyone knows of a way to change the panorama background image dynamically when the user scrolls across on windows phone 7?
On the Xaml do:
<controls:Panorama Title="my application" SelectionChanged="Panorama_SelectionChanged">
<controls:Panorama.Background>
<ImageBrush x:Name="myImg" ImageSource="PanoramaBackground.png"/>
</controls:Panorama.Background>
...
..
. // your code
To change the Image at code behind use:
private void Panorama_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
myImg.ImageSource = new BitmapImage(new Uri("Jellyfish.jpg", UriKind.Relative));
}
Its working for me. Hope it helps you too.