Inheritance: ContainerBase
Exemple #1
0
 void Menu_AfterItemAdd(MenuBase item)
 {
     item.Items.AfterItemAdd += MenuItems_AfterItemAdd;
 }
        /*  Methods
         *  -----------------------------------------------------------------------------------------------*/

        /// <summary>
        ///
        /// </summary>
        /// <param name="menu"></param>
        /// <returns></returns>
        public virtual DefaultTabMenuCollectionBuilder <TParent, TParentBuilder> Add(MenuBase menu)
        {
            this.Owner.DefaultTabMenu.Add(menu);
            return(this);
        }
 /// <summary>
 /// Set a child menu for this item. See the menu configuration.
 /// </summary>
 /// <param name="menu">A menu, or menu configuration. null may be passed to remove the menu.</param>
 /// <param name="destroyMenu">True to destroy any existing menu. False to prevent destruction. If not specified, the destroyMenu configuration will be used.</param>
 public virtual void SetMenu(MenuBase menu, bool destroyMenu)
 {
     this.Call("setMenu", menu != null ? menu.ToConfig() : null, destroyMenu);
 }
 /// <summary>
 /// Set a child menu for this item. See the menu configuration.
 /// </summary>
 /// <param name="menu">A menu, or menu configuration. null may be passed to remove the menu.</param>
 public virtual void SetMenu(MenuBase menu)
 {
     this.Call("setMenu", menu != null ? menu.ToConfig() : null);
 }
 /// <summary>
 /// Set a child menu for this item. See the menu configuration.
 /// </summary>
 /// <param name="menu">A menu, or menu configuration. null may be passed to remove the menu.</param>
 /// <param name="destroyMenu">True to destroy any existing menu. False to prevent destruction. If not specified, the destroyMenu configuration will be used.</param>
 public virtual void SetMenu(MenuBase menu, bool destroyMenu)
 {
     this.Call("setMenu", menu != null ? menu.ToConfig() : null, destroyMenu);
 }
 /// <summary>
 /// Set a child menu for this item. See the menu configuration.
 /// </summary>
 /// <param name="menu">A menu, or menu configuration. null may be passed to remove the menu.</param>
 public virtual void SetMenu(MenuBase menu)
 {
     this.Call("setMenu", menu != null ? menu.ToConfig() : null);
 }
Exemple #7
0
 public virtual TBuilder Menu(MenuBase menu)
 {
     this.ToComponent().Menu.Add(menu);
     return(this as TBuilder);
 }
Exemple #8
0
        /*  Methods
         *  -----------------------------------------------------------------------------------------------*/

        /// <summary>
        ///
        /// </summary>
        /// <param name="menu"></param>
        /// <returns></returns>
        public virtual MenuItemBaseMenuCollectionBuilder <TParent, TParentBuilder> Add(MenuBase menu)
        {
            this.Owner.Menu.Add(menu);
            return(this);
        }
Exemple #9
0
        protected virtual void AfterItemRemove(MenuBase item)
        {
            if (this.Controls.Contains(item))
            {
                this.Controls.Remove(item);
            }

            if (this.LazyItems.Contains(item))
            {
                this.LazyItems.Remove(item);
            }
        }
Exemple #10
0
        protected virtual void AfterItemAdd(MenuBase item)
        {
            if (!this.Controls.Contains(item))
            {
                this.Controls.Add(item);
            }

            if (!this.LazyItems.Contains(item))
            {
                this.LazyItems.Add(item);
            }
        }
Exemple #11
0
 void Menu_AfterItemAdd(MenuBase item)
 {
     item.Items.AfterItemAdd += MenuItems_AfterItemAdd;
 }