wpf WPF中的自定义消息框按钮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14745421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 07:23:49  来源:igfitidea点击:

Custom MessageBox Button In WPF

c#.netwpf

提问by uncia

Is there a way to customize button on WPF MessageBox instead "Yes" and "No", I want "Enter" or "Exit" or something like that . All web i search told it is difficult do it rather by creating a window and all but those were 3 or 4 year old answers. Right now is there any easy way to do it ?

有没有办法自定义 WPF MessageBox 上的按钮而不是“是”和“否”,我想要“进入”或“退出”或类似的东西。我搜索的所有网络都告诉我很难通过创建一个窗口来完成它,除了那些是 3 或 4 年前的答案。现在有什么简单的方法可以做到吗?

回答by Jalal

You can customize WPF Toolkit ExtendeMessageBox. Or you can use a custom one WPFCustomMessageBoxthat ACB suggested.

您可以自定义WPF Toolkit Extende MessageBox。或者您可以使用ACB 建议的自定义 WPFCustomMessageBox