我有兩臺顯示器。當我的應用程序運行時,父級顯示在第一臺顯示器上。當我將父窗口移動到第二個監視器並單擊某個按鈕(顯示一個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