你能改变消息框的风格吗? (WPF) [英] Can you change the style of a message box? (WPF)

查看:70
本文介绍了你能改变消息框的风格吗? (WPF)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在WPF中更改消息框的样式,还是需要创建新的页面/窗口并按此方式执行?



干杯



Dan

Hi, is it possible to change the style of a message box in WPF or would I need to create a new page/window and do it that way?

Cheers

Dan

推荐答案

用于Vista和XP的WPF常见TaskDialog [ ^ ]


更好的是,使用WPF扩展工具包的MessageBox并在App.xaml中设置样式。



http://wpftoolkit.codeplex.com/wikipage?title=MessageBox&referringTitle=Home
Better yet, use the WPF Extended Toolkit's MessageBox and style it in your App.xaml.

http://wpftoolkit.codeplex.com/wikipage?title=MessageBox&referringTitle=Home


我认为最好创建自己的MessageBoxView.xaml和以您想要的任何方式自定义,而不是修改系统提供消息框,这将为您提供更强的代码灵活性。
I think its better to create your own MessageBoxView.xaml and customize that in whatever manner you want rather than modifying the System Provide messagebox, this will provide you greater Flexibility with your code.


这篇关于你能改变消息框的风格吗? (WPF)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆