【发布时间】:2016-05-25 13:25:19
【问题描述】:
我用过这个:
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
将第一个窗口 (W1) 定位在屏幕中间。
单击按钮后,我想在第一个窗口旁边放置一个新窗口 (W2)。
【问题讨论】:
-
快速浏览一下,这似乎只是基本计算加减的问题。尝试获取 firstWindow 的位置值和宽度、高度。(通过 firstWindow.Width 和 firstWindow.Height)。并经过简单计算,将计算值设置为 secondWindow.Left 和 secondWindow.Top 之类的。