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
Loading
John WiesePosted Jun 3, 2010, 9:23 AM
The Code Project: Understanding the Visual Tree and Logical Tree in WPF
C# Online.NET: WPF Concepts—Logical and Visual Trees
Sachin JosephPosted Jun 3, 2010, 10:02 AM
I think your advice would do for my problem.
Thank you.
Sachin Joseph