我有两台显示器。当我的应用程序运行时,父级显示在第一台显示器上。当我将父窗口移动到第二个监视器并单击某个按钮(显示一个xaml窗口进行加载)时,此子窗口会保留在第一个监视器上。有没有办法让子窗口留在父窗口中,而不管父窗口在哪里?双显示器父子窗口问题
请注意:父母是winform ...孩子是xaml。
加载XAML(可儿)
<Window x:Class="Test.Loading"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
WindowStyle="None"
AllowsTransparency="True"
WindowState="Maximized"
Background="Gray">
<Grid>
<Border>
<TextBlock Text="Loading ..." />
</Border>
</Grid>
</Window>
家长
private void btnShowLoading_Click(object sender, EventArgs e)
{
Loading load = new Loading();
double top = this.Top;
double left = this.Left;
load.Top = top;
load.Left = left;
load.Show();
}
什么样的类型加载是? – Dilshod 2013-03-21 18:49:30