0
我的要求是, 在第一个xaml页面放置所有的图像。如果每次点击特定的图像,该图像可以显示在另一个xaml页面。如何将图像值从一个xaml页面传递到另一个xaml页面的Windows Phone 7使用silverlight进行应用程序开发。如何将一个xaml页面中的图像值传递给windows phone 7中的另一个xaml页面?
我的要求是, 在第一个xaml页面放置所有的图像。如果每次点击特定的图像,该图像可以显示在另一个xaml页面。如何将图像值从一个xaml页面传递到另一个xaml页面的Windows Phone 7使用silverlight进行应用程序开发。如何将一个xaml页面中的图像值传递给windows phone 7中的另一个xaml页面?
有一个关于网页间导航(和值传递)在http://www.dimecasts.net/Casts/CastDetails/174
从DimeCasts.net作为这样的一种方式的示例不同的方式一个很好的截屏(并假设图像是在一个列表框)会请将以下内容添加到SelectionChanged
事件中。
private void OnSelectedImageChanged(object sender, SelectionChangedEventArgs e)
{
NavigationService.Navigate(new Uri(string.Format("/image/{0}", HttpUtility.UrlEncode(((sender as ListBox).SelectedItem as PhotoViewModel).uri)), UriKind.Relative));
}
上面假定像适当映射路线:
<nav:UriMapping Uri="/image/{image}" MappedUri="/Image.xaml?u={image}" />
和原始列表框被绑定到PhotoViewModel
对象的uri
属性。
希望看到屏幕录像应该让上述任何一个更清晰。