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);
}
}
}
时间: 2024-11-05 09:23:08