/// <summary>
        /// Creates a new TreeTabItem
        /// </summary>
        /// <param name="_id">string</param>
        /// <param name="_headerText">string</param>
        /// <param name="_showCloseButton">bool</param>
        /// <param name="_type">TreeItem.TREEITEM_TYPE</param>
        /// <returns>TreeTabItem</returns>
        private TreeTabItem CreateTabItem(string _id, string _headerText, bool _showCloseButton, TreeItem.TREEITEM_TYPE _type)
        {
            TreeTabItem tab;

            if (_type == TreeItem.TREEITEM_TYPE.MAIN)
            {
                tab = new TreeTabItem(_id, _headerText, _showCloseButton);
            }
            else
            {
                tab = new TreeTabItemGroup(_id, _headerText, _showCloseButton);
            }
            return(tab);
        }
 /// <summary>
 /// Adds a new TreeTabItem at the collection of a certain TreeTabItemGroup object.
 /// Adds a new TreeItem at the collection of certain TreeItem.
 /// </summary>
 /// <param name="_id">string</param>
 /// <param name="_headerText">string</param>
 /// <param name="_showCloseButton">bool</param>
 /// <param name="_type">TreeItem.TREEITEM_TYPE</param>
 /// <param name="_parent">TreeTabItemGroup</param>
 /// <returns>TreeTabItem</returns>
 public TreeTabItem AddTabItem(string _id, string _headerText, bool _showCloseButton, TreeItem.TREEITEM_TYPE _type, TreeTabItemGroup _parent)
 {
     TreeTabItem tab = null;
     if (_parent != null && this.CheckId(_id))
     {
         tab = this.CreateTabItem(_id, _headerText, _showCloseButton, _type);
         TreeItem tItem = new TreeItem(_type, _headerText, _id);
         tItem.LinkedTabItem = tab;
         _parent.Items.Add(tab);
         TreeItem tParent = this.GetTreeItemById(_parent.Id);
         tParent.Items.Add(tItem);
     }
     return tab;
 }
 /// <summary>
 /// Creates a new TreeTabItem
 /// </summary>
 /// <param name="_id">string</param>
 /// <param name="_headerText">string</param>
 /// <param name="_showCloseButton">bool</param>
 /// <param name="_type">TreeItem.TREEITEM_TYPE</param>
 /// <returns>TreeTabItem</returns>
 private TreeTabItem CreateTabItem(string _id, string _headerText, bool _showCloseButton, TreeItem.TREEITEM_TYPE _type)
 {
     TreeTabItem tab;
     if (_type == TreeItem.TREEITEM_TYPE.MAIN)
         tab = new TreeTabItem(_id, _headerText, _showCloseButton);
     else
         tab = new TreeTabItemGroup(_id, _headerText, _showCloseButton);
     return tab;
 }
        /// <summary>
        /// Adds a new TreeTabItem at the collection of a certain TreeTabItemGroup object.
        /// Adds a new TreeItem at the collection of certain TreeItem.
        /// </summary>
        /// <param name="_id">string</param>
        /// <param name="_headerText">string</param>
        /// <param name="_showCloseButton">bool</param>
        /// <param name="_type">TreeItem.TREEITEM_TYPE</param>
        /// <param name="_parent">TreeTabItemGroup</param>
        /// <returns>TreeTabItem</returns>
        public TreeTabItem AddTabItem(string _id, string _headerText, bool _showCloseButton, TreeItem.TREEITEM_TYPE _type, TreeTabItemGroup _parent)
        {
            TreeTabItem tab = null;

            if (_parent != null && this.CheckId(_id))
            {
                tab = this.CreateTabItem(_id, _headerText, _showCloseButton, _type);
                TreeItem tItem = new TreeItem(_type, _headerText, _id);
                tItem.LinkedTabItem = tab;
                _parent.Items.Add(tab);
                TreeItem tParent = this.GetTreeItemById(_parent.Id);
                tParent.Items.Add(tItem);
            }
            return(tab);
        }