Monday, March 22, 2010

Me.Controls in WPF

Use the parent control children property.
below Main is my grid name which contains saveral controls (some of them are textboxes)

For Each Control As Control In Main.Children
If Control.GetType.ToString() = "System.Windows.Controls.TextBox" Then
Control.BorderBrush = Brushes.Gray
End If
Next

No comments: