public void SetUp() { parent = new ThreeStateNode("parent"); child1 = new ThreeStateNode("child1"); child2 = new ThreeStateNode("child2"); parent.Nodes.Add(child1); parent.Nodes.Add(child2); }
/// <summary> /// Allows inheriting classes to block cascading check state. /// </summary> /// <param name="child">The child to evaluate.</param> /// <param name="checkState">The proposed check state.</param> /// <returns>True if the check state can be cascaded, otherwise false.</returns> protected virtual bool ChildShouldBeChecked(ThreeStateNode child, CheckState checkState) { return(true); }
/// <summary> /// Allows inheriting classes to block cascading check state. /// </summary> /// <param name="child">The child to evaluate.</param> /// <param name="checkState">The proposed check state.</param> /// <returns>True if the check state can be cascaded, otherwise false.</returns> protected virtual bool ChildShouldBeChecked(ThreeStateNode child, CheckState checkState) { return true; }