WPF MessageBox位置? [英] WPF MessageBox Position?

查看:371
本文介绍了WPF MessageBox位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

有没有办法设置消息框的位置?

Is there a way to set the Position of a messagebox?

这是正常消息...

MessageBox.Show("Center Text", "Headline", MessageBoxButton.YesNo, MessageBoxImage.Warning );

现在我将设置MessageBox的顶部/左侧位置......

Now i will set Top/Left Position of the MessageBox...

这很容易吗?

推荐答案

MessageBox上没有允许定位的属性。

There is no properties on the MessageBox to allow for positioning.

如果你想定位我会建议你创建自己的MessageBox,这将是一个简单的窗口 文字和你想要的任何按钮。 然后,您可以将MessageBox定位到您想要的位置。

If you want to position I would suggest you create your own MessageBox which would be a simple window with  the text and whatever buttons you would like.  You could then position that MessageBox to where you want.


这篇关于WPF MessageBox位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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