private static Int32 EnsureValue(GroupCountUpDown item) { var value = item.Value; if (!value.HasValue) { throw new NotSupportedException(); // <Null> values not allowed. } return(value.Value); }
public void AddChild(GroupCountUpDown item) { if (Object.ReferenceEquals(item, null)) { throw new ArgumentNullException(nameof(item)); } item.IsCoupled = false; this.children.Add(item); this.InvalidateConstraint(); }
public Boolean RemoveChild(GroupCountUpDown item) { if (Object.ReferenceEquals(item, null)) { throw new ArgumentNullException(nameof(item)); } if (!this.children.Remove(item)) { return(false); } this.InvalidateConstraint(); return(true); }