I was trying to migrate one of my WinForms project to WPF.
Is there any method to get all controls on a WPF Window similar to MyWindowsForm.Controls() or MyWindowsFormGroupBox.Controls() to access all controls on a WPF Window?
How can I have access to all controls on a WPF Window or a WPF grid (not DataGrid) pragmatically?
How can I access all controls in a WPF Window or WPF Grid, the Windows Forms way like this?:
For Each ctrl as Control in MyWindowsFormGroupBox.Controls()
If TypeOf ctrl is TextBox Then CType(ctrl, TextBox).Text = ""
Next
Please clear my WPF controls doubt
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

John Wiese106 reputationPosted Jun 3, 2010, 5:23 AM EDT
The Code Project: Understanding the Visual Tree and Logical Tree in WPF
C# Online.NET: WPF Concepts—Logical and Visual Trees
Sachin Joseph4 reputationPosted Jun 3, 2010, 6:02 AM EDT
I think your advice would do for my problem.
Thank you.
Sachin Joseph