/// <summary>
 /// Create and add children from a collection of ids
 /// </summary>
 /// <param name="ids"></param>
 /// <param name="type"></param>
 public void AddChildren(IEnumerable <int> ids, EventConfigNodeType type, bool isChecked = false)
 {
     foreach (int id in ids)
     {
         this.AddChild(new EventConfigNodeViewModel(id, type), isChecked);
     }
 }
 /// <summary>
 /// Constructor for property leaf node with given name
 /// </summary>
 /// <param name="id"></param>
 /// <param name="type"></param>
 public EventConfigNodeViewModel(int id, string name, EventConfigNodeType type)
 {
     this.Id               = id;
     this.Header           = name;
     this.Type             = type;
     this.ButtonVisibility = Visibility.Collapsed;
     this.TextVisibility   = Visibility.Visible;
 }
        /// <summary>
        /// Create and add children from a collection of ids
        /// </summary>
        public void AddChildren(IEnumerable <int> ids, EventConfigNodeType type, bool isChecked)
        {
            if (ids == null)
            {
                throw new ArgumentNullException(nameof(ids));
            }

            foreach (int id in ids)
            {
                this.AddChild(new EventConfigNodeViewModel(id, type), isChecked);
            }
        }
 /// <summary>
 /// Constructor for event or property leaf node from id
 /// </summary>
 /// <param name="id"></param>
 /// <param name="type"></param>
 public EventConfigNodeViewModel(int id, EventConfigNodeType type)
 {
     this.Id = id;
     if (type == EventConfigNodeType.Event)
     {
         this.Header = EventType.GetInstance().GetNameById(id);
     }
     else
     {
         this.Header = PropertyType.GetInstance().GetNameById(id);
     }
     this.Type             = type;
     this.ButtonVisibility = Visibility.Collapsed;
     this.TextVisibility   = Visibility.Visible;
 }
 /// <summary>
 /// Create and add children from a collection of ids
 /// </summary>
 public void AddChildren(IEnumerable <int> ids, EventConfigNodeType type)
 {
     this.AddChildren(ids, type, false);
 }