FlipView:HOWTO绑定集合<串GT;为的ItemsSource [英] FlipView: HowTo bind a Collection<string> as ItemsSource

查看:84
本文介绍了FlipView:HOWTO绑定集合<串GT;为的ItemsSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有绑定收藏℃的聪明的方式;串> 包含中要显示的图像的URL的 FlipView

Is there a smart way to bind a Collection<string> that contains the URLs of images to be shown in a FlipView?

还是我必须提供在收藏<图像;图像>

推荐答案

您可以使用的URL绑定那些来源图像属性内的的ItemTemplate

You can use URLs binding those to Source attribute of an Image inside an ItemTemplate:

<FlipView.ItemTemplate>
   <DataTemplate>
       <Image Source="{Binding}" />
   </DataTemplate>
</FlipView.ItemTemplate>

flipView.ItemsSource = imageUrls;

在FlipView显示从冰图像的一个例子。

An example of displaying images from Bing in a FlipView.

这篇关于FlipView:HOWTO绑定集合&LT;串GT;为的ItemsSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆