/// <summary>
 /// Add a single child to node
 /// </summary>
 /// <param name="child"></param>
 public void AddChild(EventConfigNodeViewModel child, bool isChecked = false)
 {
     this.Children.Add(child);
     child.IsChecked = isChecked;
     if (child.Id == EventType.UIA_AutomationFocusChangedEventId)
     {
         child.IsChecked = ConfigurationManager.GetDefaultInstance().EventConfig.IsListeningFocusChangedEvent;
     }
     child.Depth = this.Depth + 1;
 }
        /// <summary>
        /// Remove a child
        /// </summary>
        /// <param name="child"></param>
        public void RemoveChild(EventConfigNodeViewModel child)
        {
            if (child == null)
            {
                throw new ArgumentNullException(nameof(child));
            }

            child.IsChecked = false;
            this.Children.Remove(child);
        }
        /// <summary>
        /// Insert a single child at the specified location
        /// </summary>
        /// <param name="index">The index in the list to insert the child</param>
        /// <param name="child">The child to insert</param>
        public void InsertChildAtIndex(int index, EventConfigNodeViewModel child)
        {
            if (child == null)
            {
                throw new ArgumentNullException(nameof(child));
            }

            this._children.Insert(index, child);
            child._parent = this;
            this.SetCheckedInternal(null, respondingToChildChange: true);
        }
        /// <summary>
        /// Remove a child
        /// </summary>
        /// <param name="child"></param>
        public void RemoveChild(EventConfigNodeViewModel child)
        {
            if (child == null)
            {
                throw new ArgumentNullException(nameof(child));
            }

            child._parent = null;
            this._children.Remove(child);
            this.SetCheckedInternal(null, respondingToChildChange: true);
            child.IsChecked = false;
        }
        /// <summary>
        /// Add a single child to node
        /// </summary>
        /// <param name="child"></param>
        public void AddChild(EventConfigNodeViewModel child, bool isChecked = false)
        {
            if (child == null)
            {
                throw new ArgumentNullException(nameof(child));
            }

            this._children.Add(child);
            child.IsChecked = isChecked;
            if (child.Id == EventType.UIA_AutomationFocusChangedEventId)
            {
                child.IsChecked = ConfigurationManager.GetDefaultInstance().EventConfig.IsListeningFocusChangedEvent;
            }
            child.Depth   = this.Depth + 1;
            child._parent = this;
            this.SetCheckedInternal(null, respondingToChildChange: true);
        }
 /// <summary>
 /// Remove a child
 /// </summary>
 /// <param name="child"></param>
 public void RemoveChild(EventConfigNodeViewModel child)
 {
     child.IsChecked = false;
     this.Children.Remove(child);
 }