Find popup window in Wpf
Hi, I want to get all opened popups in a specific window in Wpf, but I couldn't find a solution to solve it.
3 Replies
I found that in Uwp exists VisualTreeHelper.GetOpenPopups(), but is there any option to use it in Wpf?
You could use reflection to access the
Window._showingAsDialog
field, then iterate it using Application.Current.Windows.Cast<Window>().Where(x => x.Parent == targetParenttWindow && IsOpenedAsDialog(x))
It's not working for popups used for example in combobox
I found solution