windows phone开发之ToastPrompt测试Demo与Coding4Fun效果对比(有图有真相)

昨天研究了一下Coding4Fun的对话框,发现还是太复杂,不符合我的风格,简单、低调就好。于是顺便看了一下ToastPrompt,然后做了一个面向对象封装

首先代码段

/// <summary> /// 信息提示 /// </summary> /// <param name="content">提示的信息内容</param> /// <param name="title">提示的标题</param> /// <param name="timeout">提示消息的显示过期时间。单位毫秒</param> public void Coding4FunForMsg(string content, string title, int timeout) { SolidColorBrush White = new SolidColorBrush(Colors.White); SolidColorBrush Red = new SolidColorBrush(Colors.Brown); ToastPrompt toast = new ToastPrompt { Background = Red, IsTimerEnabled = true, IsAppBarVisible = true, MillisecondsUntilHidden = timeout, Foreground = White, }; toast.Title = title; toast.Message = content; toast.TextOrientation = System.Windows.Controls.Orientation.Horizontal; toast.Show(); }

其次调用:

new Classes.Util.Msg().Coding4FunForMsg("this is content", "Title", 3000);

最后截图:(对比昨天的对话框,简直帅多了)

这是昨天的效果图:点击打开昨天的博客文章链接



这是上面代码的实现效果图:



结论:差异巨大,效果明显。手机显示小,但是人性化的提示和操作还是会赢得用户体验的!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值