Closed Stians92 closed 5 years ago
@Stians92 Can you create a short sample which reproduces this issue? Thx
I’m closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on for so long, then it seems no one has the time to implement this.
Please reopen if you still encounter this issue with the latest stable or pre-release version and please use the issue template.
Thank you! 🙏
Edit: Setting AllowFocusElement="False" prevents the error from occurring, so it's definitely an issue with TryFocusElement.
I recently ran into a weird crash when using the SimpleChildWindow.
I have a datagridview in my main window. This datagridview is editable and it has a contextmenu with the option to launch a child window. If you edit a cell, then right click to bring up the contextmenu and choose the launch child window button, my application crashes with the error message in the title.
The exception is only thrown if you go directly from editing a cell to launching the child window. If you press enter to finish editing before opening the window, everything works as expected. I never ran into this issue myself, as I always press enter to commit after editing a cell, but some of my users went directly from editing to the right-click contextmenu.
The exception is a System.InvalidOperationException.
From the stack trace it looks like it might have something to do with the TryFocusElement in the ChildWindow class: