76 references to ValidationConstraints
System.Windows.Forms (20)
System\Windows\Forms\Control.cs (11)
8432internal bool PerformContainerValidation(ValidationConstraints validationConstraints) 8440if ((validationConstraints & ValidationConstraints.ImmediateChildren) != ValidationConstraints.ImmediateChildren 8448if (((validationConstraints & ValidationConstraints.Selectable) == ValidationConstraints.Selectable && !c.GetStyle(ControlStyles.Selectable)) 8449|| ((validationConstraints & ValidationConstraints.Enabled) == ValidationConstraints.Enabled && !c.Enabled) 8450|| ((validationConstraints & ValidationConstraints.Visible) == ValidationConstraints.Visible && !c.Visible) 8451|| ((validationConstraints & ValidationConstraints.TabStop) == ValidationConstraints.TabStop && !c.TabStop))
System\Windows\Forms\Form.cs (2)
6492/// equivalent to calling ValidateChildren(ValidationConstraints.Selectable). See <see cref="ValidationConstraints.Selectable"/> 6508public override bool ValidateChildren(ValidationConstraints validationConstraints)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
1846/// equivalent to calling ValidateChildren(ValidationConstraints.Selectable). See <see cref="ValidationConstraints.Selectable"/> 1851public virtual bool ValidateChildren() => ValidateChildren(ValidationConstraints.Selectable); 1859public virtual bool ValidateChildren(ValidationConstraints validationConstraints) 1863throw new InvalidEnumArgumentException(nameof(validationConstraints), (int)validationConstraints, typeof(ValidationConstraints));
System\Windows\Forms\Layout\Containers\ValidationConstraints.cs (1)
8/// by the <see cref="ContainerControl.ValidateChildren(ValidationConstraints)"/> method.
System\Windows\Forms\UserControl.cs (2)
220/// equivalent to calling ValidateChildren(ValidationConstraints.Selectable). See <see cref="ValidationConstraints.Selectable"/> 236public override bool ValidateChildren(ValidationConstraints validationConstraints)
System.Windows.Forms.Tests (56)
System\Windows\Forms\ContainerControlTests.cs (28)
984[EnumData<ValidationConstraints>] 985public void ContainerControl_ValidateChildren_InvokeValidationConstraintsWithoutChildren_ReturnsTrue(ValidationConstraints validationConstraints) 993yield return new object[] { ValidationConstraints.ImmediateChildren, true, 0, 0, 0, 1, 1, 1, 1 }; 994yield return new object[] { ValidationConstraints.ImmediateChildren, false, 1, 0, 0, 1, 1, 1, 1 }; 996yield return new object[] { ValidationConstraints.Selectable, true, 0, 1, 0, 0, 1, 1, 1 }; 997yield return new object[] { ValidationConstraints.Selectable, false, 1, 1, 0, 0, 1, 1, 1 }; 999yield return new object[] { ValidationConstraints.Enabled, true, 0, 1, 1, 1, 0, 1, 1 }; 1000yield return new object[] { ValidationConstraints.Enabled, false, 1, 1, 1, 1, 0, 1, 1 }; 1002yield return new object[] { ValidationConstraints.Visible, true, 0, 1, 0, 1, 1, 0, 1 }; 1003yield return new object[] { ValidationConstraints.Visible, false, 1, 1, 0, 1, 1, 0, 1 }; 1005yield return new object[] { ValidationConstraints.TabStop, true, 0, 1, 0, 1, 1, 1, 0 }; 1006yield return new object[] { ValidationConstraints.TabStop, false, 1, 1, 0, 1, 1, 1, 0 }; 1008yield return new object[] { ValidationConstraints.None, true, 0, 1, 1, 1, 1, 1, 1 }; 1009yield return new object[] { ValidationConstraints.None, false, 1, 1, 1, 1, 1, 1, 1 }; 1011yield return new object[] { ValidationConstraints.ImmediateChildren | ValidationConstraints.Selectable | ValidationConstraints.Enabled | ValidationConstraints.Visible | ValidationConstraints.TabStop, true, 0, 0, 0, 0, 0, 0, 0 }; 1012yield return new object[] { ValidationConstraints.ImmediateChildren | ValidationConstraints.Selectable | ValidationConstraints.Enabled | ValidationConstraints.Visible | ValidationConstraints.TabStop, false, 1, 0, 0, 0, 0, 0, 0 }; 1017public void ContainerControl_ValidateChildren_InvokeValidationConstraintsWithChildren_ReturnsExpected(ValidationConstraints validationConstraints, bool cancel, int expectedChild1CallCount, int expectedGrandchild2CallCount, int expectedGrandchild3CallCount, int expectedChild4CallCount, int expectedChild5CallCount, int expectedChild6CallCount, int expectedChild7CallCount) 1210[InlineData((ValidationConstraints)(-1))] 1211[InlineData((ValidationConstraints)(0x20))] 1212public void ContainerControl_ValidateChildren_InvalidValidationConstraints_ThrowsInvalidEnumArgumentException(ValidationConstraints validationConstraints)
System\Windows\Forms\UserControlTests.cs (28)
1450[EnumData<ValidationConstraints>] 1451public void UserControl_ValidateChildren_InvokeValidationConstraintsWithoutChildren_ReturnsTrue(ValidationConstraints validationConstraints) 1459yield return new object[] { ValidationConstraints.ImmediateChildren, true, 0, 0, 0, 1, 1, 1, 1 }; 1460yield return new object[] { ValidationConstraints.ImmediateChildren, false, 1, 0, 0, 1, 1, 1, 1 }; 1462yield return new object[] { ValidationConstraints.Selectable, true, 0, 1, 0, 0, 1, 1, 1 }; 1463yield return new object[] { ValidationConstraints.Selectable, false, 1, 1, 0, 0, 1, 1, 1 }; 1465yield return new object[] { ValidationConstraints.Enabled, true, 0, 1, 1, 1, 0, 1, 1 }; 1466yield return new object[] { ValidationConstraints.Enabled, false, 1, 1, 1, 1, 0, 1, 1 }; 1468yield return new object[] { ValidationConstraints.Visible, true, 0, 1, 0, 1, 1, 0, 1 }; 1469yield return new object[] { ValidationConstraints.Visible, false, 1, 1, 0, 1, 1, 0, 1 }; 1471yield return new object[] { ValidationConstraints.TabStop, true, 0, 1, 0, 1, 1, 1, 0 }; 1472yield return new object[] { ValidationConstraints.TabStop, false, 1, 1, 0, 1, 1, 1, 0 }; 1474yield return new object[] { ValidationConstraints.None, true, 0, 1, 1, 1, 1, 1, 1 }; 1475yield return new object[] { ValidationConstraints.None, false, 1, 1, 1, 1, 1, 1, 1 }; 1477yield return new object[] { ValidationConstraints.ImmediateChildren | ValidationConstraints.Selectable | ValidationConstraints.Enabled | ValidationConstraints.Visible | ValidationConstraints.TabStop, true, 0, 0, 0, 0, 0, 0, 0 }; 1478yield return new object[] { ValidationConstraints.ImmediateChildren | ValidationConstraints.Selectable | ValidationConstraints.Enabled | ValidationConstraints.Visible | ValidationConstraints.TabStop, false, 1, 0, 0, 0, 0, 0, 0 }; 1483public void UserControl_ValidateChildren_InvokeValidationConstraintsWithChildren_ReturnsExpected(ValidationConstraints validationConstraints, bool cancel, int expectedChild1CallCount, int expectedGrandchild2CallCount, int expectedGrandchild3CallCount, int expectedChild4CallCount, int expectedChild5CallCount, int expectedChild6CallCount, int expectedChild7CallCount) 1676[InlineData((ValidationConstraints)(-1))] 1677[InlineData((ValidationConstraints)(0x20))] 1678public void UserControl_ValidateChildren_InvalidValidationConstraints_ThrowsInvalidEnumArgumentException(ValidationConstraints validationConstraints)