校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > Windows 8技巧:Windows 8 中的Toast Tile Badge通知的使用方法

Windows 8技巧:Windows 8 中的Toast Tile Badge通知的使用方法

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

  在Windows 8中有三種通知的方式及時提醒用戶,它們分別是Toast,Tile,Badge

  Toast:是在應用程序中及時彈出的提醒通知。

  Tile:是磁貼通知,用于Metro界面中的應用程序圖標上進行圖片和文字通知。

  Badge:是在磁貼小貼士通知,用于Metro界面中的應用程序圖標右下角提示當前有多少新消息或者當前應用程序狀態(tài),如(playing paused newMessage)等。

  準備工作:   首先:引用NotificationsExtensions.winmd庫,這是對各種通知簡化訪問的封裝。

        其次:打開Package.appxmanifest重新設置各種徽標。

        最后:打開Package.appxmanifest,設置“支持Toast通知”為“是”。

Toast:

復制代碼
代碼如下:

private void ToastNotice_Click(object sender, RoutedEventArgs e)
{
//Toast通知文字以及圖片設置
IToastImageAndText01 Toast = ToastContentFactory.CreateToastImageAndText01();
Toast.TextBodyWrap.Text = "今日世界末日倒數(shù)10天!";
Toast.Image.Src = "http://news.shangdu.com/301/20120512/P_5626361_0__1686841290.jpg";
ToastNotificationManager.CreateToastNotifier().Show(Toast.CreateNotification());
}

效果圖片:

Tile:

復制代碼
代碼如下:

private void TileNotice_Click(object sender, RoutedEventArgs e)
{
//Tile通知文字以及圖片設置
ITileWideImageAndText01 tile = TileContentFactory.CreateTileWideImageAndText01();
tile.TextCaptionWrap.Text = "小資情有獨鐘 10款合資熱銷時尚車型導購";
tile.Image.Src = "http://news.mycar168.com/uploadfile/2011/1030/20111030040816628.jpg";/p> p> ITileSquareImage wideImageContent = TileContentFactory.CreateTileSquareImage();
wideImageContent.Image.Src = "http://news.mycar168.com/uploadfile/2011/1030/20111030040816628.jpg";
tile.SquareContent = wideImageContent;
TileUpdateManager.CreateTileUpdaterForApplication().Update(tile.CreateNotification());
}/p> p> private void ClearTile_Click(object sender, RoutedEventArgs e)
{
//清除Tile通知
TileUpdateManager.CreateTileUpdaterForApplication().Clear();
}

效果圖片:

Badge:

復制代碼
代碼如下:

private void BadgeNotice_Click(object sender, RoutedEventArgs e)
{
//Badge數(shù)字通知
BadgeNumericNotificationContent badge = new BadgeNumericNotificationContent(29);
BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badge.CreateNotification());
}/p> p> private void BadgeImage_Click(object sender, RoutedEventArgs e)
{
//Badge狀態(tài)圖片通知
BadgeGlyphNotificationContent badge = new BadgeGlyphNotificationContent(GlyphValue.Paused);
BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badge.CreateNotification());
}/p> p> private void BadgeClear_Click(object sender, RoutedEventArgs e)
{
//清楚Badge通知
BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear();
}

圖片效果見圖片右下角:

 

Xaml:

復制代碼
代碼如下:

Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
Button Content="Toast通知" HorizontalAlignment="Left" Name="ToastNotice"
Margin="250,172,0,0" VerticalAlignment="Top" Click="ToastNotice_Click"/>
Button Content="Tile 通知" HorizontalAlignment="Left" Name="TileNotice"
Margin="394,172,0,0" VerticalAlignment="Top" Click="TileNotice_Click"/>
Button Content="清除Tile通知" HorizontalAlignment="Left" Name="ClearTile"
Margin="559,172,0,0" VerticalAlignment="Top" Click="ClearTile_Click" />
Button Content="Badge數(shù)字" HorizontalAlignment="Left" Name="BadgeNotice"
Margin="250,270,0,0" VerticalAlignment="Top" Click="BadgeNotice_Click"/>
Button Content="Badge圖片" HorizontalAlignment="Left" Name="BadgeImage"
Margin="394,270,0,0" VerticalAlignment="Top" Click="BadgeImage_Click" />
Button Content="Badge清除" HorizontalAlignment="Left" x:Name="BadgeClear"
Margin="559,270,0,0" VerticalAlignment="Top" Click="BadgeClear_Click" />
/Grid>
  

  最后如需源碼請點擊 Win8Notice_jb51net.rar 下載。 

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

巨人網(wǎng)絡通訊聲明:本文標題《Windows 8技巧:Windows 8 中的Toast Tile Badge通知的使用方法》,本文關鍵詞  Windows,技巧,中的,Toast,Tile,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Windows 8技巧:Windows 8 中的Toast Tile Badge通知的使用方法》相關的同類信息!
  • 本頁收集關于Windows 8技巧:Windows 8 中的Toast Tile Badge通知的使用方法的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 广宁县| 商丘市| 灵宝市| 家居| 宝鸡市| 靖宇县| 大宁县| 子洲县| 库尔勒市| 铜山县| 思南县| 绿春县| 泌阳县| 精河县| 板桥市| 阿尔山市| 新竹市| 呈贡县| 望江县| 林西县| 上林县| 天台县| 富川| 莱芜市| 乌鲁木齐市| 福鼎市| 达日县| 津南区| 南京市| 永嘉县| 波密县| 景宁| 外汇| 长海县| 龙江县| 繁峙县| 雅江县| 磐石市| 杭锦后旗| 精河县| 汤原县|