码迷,mamicode.com
首页 > Windows程序 > 详细

Windows Phone Toast通知

时间:2014-06-18 13:24:46      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   ext   color   

try
            {
                string msg = this.richTextBox1.Text;
                string title = "新通知";
                string toastMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                    "<wp:Notification xmlns:wp=\"WPNotification\">" +
                       "<wp:Toast>" +
                            "<wp:Text1>" + title + "</wp:Text1>" +
                            "<wp:Text2>" + this.textBox1.Text + "</wp:Text2>" +
                            "<wp:Param>/Views/MainPage.xaml?NavigatedFrom=ToastNotification" + Uri.EscapeDataString("&title=" + title + "&msg=" + msg) + "</wp:Param>" +
                       "</wp:Toast> " +
                    "</wp:Notification>";
                byte[] strBytes = new UTF8Encoding().GetBytes(toastMessage);

                MsgLabel.Text = "发送中。。。";
                SendToastNotification(strBytes);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

 

Windows Phone Toast通知,布布扣,bubuko.com

Windows Phone Toast通知

标签:style   class   blog   code   ext   color   

原文地址:http://www.cnblogs.com/fb-boy/p/3791943.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!