-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
BugProduct bug (most likely)Product bug (most likely)InvestigateRequires further investigation by the WPF team.Requires further investigation by the WPF team.
Description
Description
The non-modal window is closed as the owner. Other window events are invalid and cannot be closed or clicked.
Reproduction Steps
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
Window1 window = null;
private void Button_Click(object sender, RoutedEventArgs e)
{
window = new Window1();
window.Show();
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
Window1 window2 = new Window1();
window2.Owner = window;
Task.Run(() => {
Thread.Sleep(3000);
System.Windows.Application.Current.Dispatcher.BeginInvoke((System.Action)(() =>
{
window.Close(); //Causes other window events to invalid
}));
});
window2.ShowDialog();
}
}
Expected behavior
Works properly
Actual behavior
Causes other window events to invalid
Regression?
This problem exists testing with .Net 5 or .Net 9
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
lindexi
Metadata
Metadata
Assignees
Labels
BugProduct bug (most likely)Product bug (most likely)InvestigateRequires further investigation by the WPF team.Requires further investigation by the WPF team.