Open emako opened 3 months ago
可以描述一下需要从Owner
继承Topmost
的使用场景吗?
可以描述一下需要从
Owner
继承Topmost
的使用场景吗?
这跟WPF的System.Windows.MessageBox.Show的工作方式一样,会自动继承owner的Topmost。 This works the same way as WPF's System.Windows.MessageBox.Show, which automatically inherits the owner's Topmost.
Test code:
private void NormalButton_Click(object sender, RoutedEventArgs e)
{
Topmost = false;
MessageBox.Show(this, "MessageBox will not be Topmost");
}
private void TopmostButton_Click(object sender, RoutedEventArgs e)
{
Topmost = true;
MessageBox.Show(this, "MessageBox will be Topmost");
}
code files: WpfApp1.zip
Describe the bug
Topmost should not be mandatory. MessageBox Topmost should be inherited from owner when owner is not null.
To Reproduce
/
Expected behavior
/
Screenshots
OS version
/
.NET version
.NET8
WPF-UI NuGet version
Additional context
/