婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Windows 8技巧:Windows 8中FlipView的使用技巧介紹

Windows 8技巧:Windows 8中FlipView的使用技巧介紹

熱門標簽:溫嶺地圖標注 外呼系統(tǒng)打哪顯哪 行政區(qū)劃地圖標注app 高德地圖標注地點更改電話號碼 金昆地圖標注是干什么的 口碑好的電話機器人費用 世界地圖標注國家怎么畫 沈陽高頻外呼防封系統(tǒng)哪家好 南寧銷售外呼系統(tǒng)廠家

  FlipView控件類似于翻頁控件,并且是現(xiàn)成的翻頁按鈕,你只需要為其增加數(shù)據(jù)項即可。本文講述兩種方式的FlipView項目和展示。

  一:直接前臺FlipViewItem

復制代碼
代碼如下:

FlipView>
FlipViewItem>
Image Stretch="Uniform" Source="http://imgcache.qq.com/club/item/wallpic/items/2/3802/760_300_3802.jpg"/>
/FlipViewItem>
FlipViewItem>
Image Stretch="Uniform" Source="http://imgcache.qq.com/club/item/wallpic/items/3/4023/c_760_300_4023.jpg"/>
/FlipViewItem>
FlipViewItem>
Image Stretch="Uniform" Source="http://imgcache.qq.com/club/item/wallpic/items/3/3673/c_760_300_3673.jpg"/>
/FlipViewItem>
FlipViewItem>
Image Stretch="Uniform" Source="http://imgcache.qq.com/club/item/wallpic/items/7/4017/c_760_300_4017.jpg"/>
/FlipViewItem>
FlipViewItem>
Image Stretch="Uniform" Source="http://imgcache.qq.com/club/item/wallpic/items/2/3972/c_760_300_3972.jpg"/>
/FlipViewItem>
/FlipView>

  效果如下:

  二:前臺設置DataTemplate,后臺實體集方式添加數(shù)據(jù)項。

復制代碼
代碼如下:

FlipView Name="fvShow" Margin="100">
FlipView.ItemTemplate>
DataTemplate>
Grid>
Grid.Background>
ImageBrush Stretch="Uniform" ImageSource="{Binding ImgUrl}"/>
/Grid.Background>
TextBlock Height="30" VerticalAlignment="Top" HorizontalAlignment="Left"
Margin="180 300 0 0" FontSize="20" Foreground="Blue" Text="{Binding ImgName}"/>
TextBlock Height="30" VerticalAlignment="Top" HorizontalAlignment="Left"
Margin="180 350 0 0" FontSize="20" Foreground="Blue" Text="{Binding ImgAddr}"/>
/Grid>
/DataTemplate>
/FlipView.ItemTemplate>
/FlipView>


復制代碼
代碼如下:

/// summary>
/// 可用于自身或?qū)Ш街?Frame 內(nèi)部的空白頁。
/// /summary>
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
this.fvShow.ItemsSource = ImgModel.GetImgData();
}/p> p> /// summary>
/// 在此頁將要在 Frame 中顯示時進行調(diào)用。
/// /summary>
/// param name="e">描述如何訪問此頁的事件數(shù)據(jù)。Parameter
/// 屬性通常用于配置頁。/param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
}
}/p> p> /// summary>
/// 圖片實體
/// /summary>
public class ImgModel
{
/// summary>
/// 圖片名字
/// /summary>
public string ImgName { get; set; }/p> p> /// summary>
/// 圖片地址
/// /summary>
public string ImgAddr { get; set; }/p> p> /// summary>
/// 圖片URL
/// /summary>
public string ImgUrl { get; set; }/p> p> 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_jb51net 下載。

標簽:中衛(wèi) 石嘴山 中山 煙臺 焦作 沈陽 防封 撫順

巨人網(wǎng)絡通訊聲明:本文標題《Windows 8技巧:Windows 8中FlipView的使用技巧介紹》,本文關鍵詞  Windows,技巧,中,FlipView,的,;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Windows 8技巧:Windows 8中FlipView的使用技巧介紹》相關的同類信息!
  • 本頁收集關于Windows 8技巧:Windows 8中FlipView的使用技巧介紹的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 云浮市| 左权县| 松潘县| 黄山市| 太康县| 襄城县| 阿克苏市| 台山市| 老河口市| 金阳县| 桂林市| 威远县| 资阳市| 揭西县| 策勒县| 卓资县| 泊头市| 兰溪市| 仙居县| 当阳市| 揭西县| 咸丰县| 泰州市| 登封市| 龙海市| 临城县| 太仓市| 拜城县| 湘阴县| 翁牛特旗| 桂林市| 且末县| 嘉善县| 察隅县| 玉龙| 红桥区| 五寨县| 沙湾县| 阳原县| 颍上县| 南木林县|