Defines constants that inform ValidateChildren about how it should validate a container's child controls.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
|Validates all child controls, and all children of these child controls, regardless of their property settings.|
|Validates child controls that can be selected.|
|Validates child controls whose Enabled property is set to true.|
|Validates child controls whose Visible property is set to true.|
|Validates child controls that have a TabStop value set, which means that the user can navigate to the control using the TAB key.|
|Validates child controls that are directly hosted within the container. Does not validate any of the children of these children. For example, if you have a Form that contains a custom UserControl, and the UserControl contains a Button, using will cause the Validating event of the UserControl to occur, but not the Validating event of the Button.|
You can combine these enumerated values together with a bitwise OR operation. Combining parameters with a bitwise OR operator will result in a logical AND operation. For example, calling ValidateChildren(ValidationConstraints.ImmediateChildren | ValidationConstraints.Enabled) will only raise the Validating event on controls that are both immediate children of the container AND are enabled.
If you do not specify when you call ValidateChildren, the method will require that you validate all child controls in the control hierarchy.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.