private void EnumVisual(Visual myVisual)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(myVisual); i++)
{
Visual childVisual = (Visual)VisualTreeHelper.GetChild(myVisual, i);
if (childVisual != null)
{
if (childVisual is TextBox) (childVisual as TextBox).IsEnabled = false;
EnumVisual(childVisual);
}
}
}