Passing image parameter c# windows Phone <p>Hi I'm trying to pass an image as a parameter within a Windows Phone app. The user is able to click a thumbnail of an image and then be directed to a new page with a full size copy of that image.</p> <p>I have tried the following but get a red line error under "image.SetSource(e.OriginalSource);" below? Obviously then the gesture event is not suitable but I don't know what else I could use?</p> <p>Here is the event code when the user clicks on one of the images. The image is nameed flickr1Image.</p> <pre><code> private void flickr1Image_Tap(object sender, System.Windows.Input.GestureEventArgs e) { if (e.OriginalSource != null) { //Edits if (PhoneApplicationService.Current.State.ContainsKey("Image")) if (PhoneApplicationService.Current.State["Image"] != null) PhoneApplicationService.Current.State.Remove("Image"); System.Windows.Media.Imaging.BitmapImage image = new System.Windows.Media.Imaging.BitmapImage(); image.SetSource(e.OriginalSource); this.flickr1Image.Source = image; PhoneApplicationService.Current.State["Image"] = image; } } </code></pre> <p>Below is the code executed to load the image into the page. I was hoping the code below would work of all images passed to it?</p> <pre><code> protected override void OnNavigatedTo(NavigationEventArgs e) { BitmapImage image = new System.Windows.Media.Imaging.BitmapImage(); image = (BitmapImage)PhoneApplicationService.Current.State["Image"]; PhoneApplicationService.Current.State.Remove("Image"); this.flick.Source = image; } </code></pre> <p>Help please</p> <p>many thanks</p>