wpf窗口 [英] wpf window

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

问题描述

hai to all,

我在wpf上练习。如何让我的窗口成为屏幕的中心。

hai to all,
am practicing on wpf . how can i make my window as center to the screen.

推荐答案

WindowStartupLocation="CenterScreen"


做所有这些事情:



0)设置 Horizo​​ntalAlignment VerticalAlignment 属性到中心



1)删除保证金属性完全



2)设置宽度高度到不超过显示器分辨率的东西。
Do all of these things:

0) Set the HorizontalAlignment and VerticalAlignment properties to Center.

1) Remove the Margin property completely

2) Set the Width and Height to something that does not exceed the resolution of the monitor.


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

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