Please clear my WPF controls doubt

Jun 3 2010 1:21 AM
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

Answers (2)