将 MdiChild 置于最前面(使用 WPF.MDI)
Bring MdiChild To Front (Using WPF.MDI)
我正在尝试在 WPF 应用程序上制作 MdiForm。但是我对如何将选定的表格带到前面感到困惑。在 VB6 中我通常使用
FrmName.ZOrder
我可以在 WPF 上使用任何相似之处吗?
无论如何这是我的代码:
using WPF.MDI;
foreach (MdiChild c in mdiMain.Children)
{
if (c.Title == "Setup Customer")
{
c.BringToFront(); //I'm having trouble here
return;
}
}
试试这个:
foreach (MdiChild c in mdiMain.Children)
{
if (c.Title == "Setup Customer")
{
c.Focus(); //TRY THIS
return;
}
}
如果符合您的需要,别忘了将此标记为答案
我正在尝试在 WPF 应用程序上制作 MdiForm。但是我对如何将选定的表格带到前面感到困惑。在 VB6 中我通常使用
FrmName.ZOrder
我可以在 WPF 上使用任何相似之处吗?
无论如何这是我的代码:
using WPF.MDI;
foreach (MdiChild c in mdiMain.Children)
{
if (c.Title == "Setup Customer")
{
c.BringToFront(); //I'm having trouble here
return;
}
}
试试这个:
foreach (MdiChild c in mdiMain.Children)
{
if (c.Title == "Setup Customer")
{
c.Focus(); //TRY THIS
return;
}
}
如果符合您的需要,别忘了将此标记为答案