传奇服务器如何做网站,用网站还是阿里巴巴做soho,制作微信网站模板下载不了,甘孜建设网站首页FlipView控件类似于翻页控件#xff0c;并且是现成的翻页按钮#xff0c;你只需要为其增加数据项即可。本文讲述两种方式的FlipView项目和展示。 一#xff1a;直接前台FlipViewItem FlipViewFlipViewItemImage StretchUniform Source并且是现成的翻页按钮你只需要为其增加数据项即可。本文讲述两种方式的FlipView项目和展示。 一直接前台FlipViewItem FlipViewFlipViewItemImage StretchUniform Sourcehttp://imgcache.qq.com/club/item/wallpic/items/2/3802/760_300_3802.jpg//FlipViewItemFlipViewItemImage StretchUniform Sourcehttp://imgcache.qq.com/club/item/wallpic/items/3/4023/c_760_300_4023.jpg//FlipViewItemFlipViewItemImage StretchUniform Sourcehttp://imgcache.qq.com/club/item/wallpic/items/3/3673/c_760_300_3673.jpg//FlipViewItemFlipViewItemImage StretchUniform Sourcehttp://imgcache.qq.com/club/item/wallpic/items/7/4017/c_760_300_4017.jpg//FlipViewItemFlipViewItemImage StretchUniform Sourcehttp://imgcache.qq.com/club/item/wallpic/items/2/3972/c_760_300_3972.jpg//FlipViewItem/FlipView 效果如下 二前台设置DataTemplate后台实体集方式添加数据项。 FlipView NamefvShow Margin100FlipView.ItemTemplateDataTemplateGridGrid.BackgroundImageBrush StretchUniform ImageSource{Binding ImgUrl}//Grid.BackgroundTextBlock Height30 VerticalAlignmentTop HorizontalAlignmentLeftMargin180 300 0 0 FontSize20 ForegroundBlue Text{Binding ImgName}/TextBlock Height30 VerticalAlignmentTop HorizontalAlignmentLeftMargin180 350 0 0 FontSize20 ForegroundBlue Text{Binding ImgAddr}//Grid/DataTemplate/FlipView.ItemTemplate/FlipView /// summary/// 可用于自身或导航至 Frame 内部的空白页。/// /summarypublic sealed partial class MainPage : Page{public MainPage(){this.InitializeComponent();this.fvShow.ItemsSource ImgModel.GetImgData();}/// summary/// 在此页将要在 Frame 中显示时进行调用。/// /summary/// param namee描述如何访问此页的事件数据。Parameter/// 属性通常用于配置页。/paramprotected override void OnNavigatedTo(NavigationEventArgs e){}}/// summary/// 图片实体/// /summarypublic class ImgModel{/// summary/// 图片名字/// /summarypublic string ImgName { get; set; }/// summary/// 图片地址/// /summarypublic string ImgAddr { get; set; }/// summary/// 图片URL/// /summarypublic string ImgUrl { get; set; }public static ListImgModel GetImgData(){ListImgModel list new ListImgModel();list.Add(new ImgModel() { ImgName 名字北京冬景, ImgAddr 地址北京市, ImgUrl http://imgcache.qq.com/club/item/wallpic/items/2/3922/760_300_3922.jpg });list.Add(new ImgModel() { ImgName 名字上海春景, ImgAddr 地址上海市, ImgUrl http://imgcache.qq.com/club/item/wallpic/items/7/3147/760_300_3147.jpg });list.Add(new ImgModel() { ImgName 名字天津秋景, ImgAddr 地址天津市, ImgUrl http://imgcache.qq.com/club/item/wallpic/items/6/3966/c_760_300_3966.jpg });list.Add(new ImgModel() { ImgName 名字海南夏景, ImgAddr 地址海南市, ImgUrl http://imgcache.qq.com/club/item/wallpic/items/5/3695/760_300_3695.jpg });list.Add(new ImgModel() { ImgName 名字成都风景, ImgAddr 地址成都市, ImgUrl http://imgcache.qq.com/club/item/wallpic/items/8/2518/760_300_2518.jpg });return list;}} 看此方式的效果如下 最后如需源码请点击 Win8FlipView.rar 下载。