首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么

2012-11-07 
Windows Store apps开发[46]当用户点击Toast通知时,我们可以做些什么注:本文由BeyondVincent(破船)原创首

Windows Store apps开发[46]当用户点击Toast通知时,我们可以做些什么

注:本文由BeyondVincent(破船)原创首发

        转载请注明出处:BeyondVincent(破船)@DevDiv.com

Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么


更多内容请查看下面的帖子


[DevDiv原创]Windows 8 开发Step by Step


小引

在之前的博文中,我曾对Toast通知进行了介绍,如下链接,建议不清楚Toast通知的可以去看看


Windows Store apps[9]通知概述(Toast,Tile和Badge)

 


使用 NotificationsExtensions 填充锁屏提醒、磁贴和 Toast 模板


private void sendToast(object sender, RoutedEventArgs e){    IToastImageAndText01 toastContent = ToastContentFactory.CreateToastImageAndText01();    toastContent.Launch = "this is launch string test";    toastContent.TextBodyWrap.Text = "破船,恭喜你,中500W!";    toastContent.Image.Src = "/Assets/98_avatar_big.jpg";    ToastNotificationManager.CreateToastNotifier().Show(toastContent.CreateNotification());}

在程序中获得launch字符串当用户点击或者触摸Toast通知,都会启动相应的程序。并触发OnLaunched事件。一定要注意:如果在toast通知中没有包含launch字符串,那么OnLaunched是不会被触发的。
下面的代码演示了如何在程序中获得launch字符串



2、触发toast通知Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么

3、获取launch字符串Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么

代码下载地址:http://www.devdiv.com/thread-147671-1-1.html




开发花絮 o(∩_∩)o
Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么

Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么

Windows Store apps开发[46]当用户点击Toast通知时,小弟我们可以做些什么


热点排行