Exemplo n.º 1
0
        private static Int32 EnsureValue(GroupCountUpDown item)
        {
            var value = item.Value;

            if (!value.HasValue)
            {
                throw new NotSupportedException();                  // <Null> values not allowed.
            }
            return(value.Value);
        }
Exemplo n.º 2
0
        public void AddChild(GroupCountUpDown item)
        {
            if (Object.ReferenceEquals(item, null))
            {
                throw new ArgumentNullException(nameof(item));
            }

            item.IsCoupled = false;
            this.children.Add(item);
            this.InvalidateConstraint();
        }
Exemplo n.º 3
0
        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);
        }