Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="objNavItemButton"></param>
        public void Remove(NavItemButton objNavItemButton)
        {
            if (objNavItemButton != null)
            {
                if (objNavItemButton.NavBar == mobjNavBar)
                {
                    objNavItemButton.NavBar = null;
                }

                //mobjNavBar.InternalRemove(objNavItemButton);

                List.Remove(objNavItemButton);

                //mobjNavBar.InvalidateLayout(new LayoutEventArgs(false, true, true));

                mobjNavBar.Update();

                if (ObservableItemRemoved != null)
                {
                    ObservableItemRemoved(this, new ObservableListEventArgs(objNavItemButton));
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="arrNavItemButtons"></param>
 public void AddRange(NavItemButton[] arrNavItemButtons)
 {
     foreach (NavItemButton objNavItemButton in arrNavItemButtons)
     {
         Add(objNavItemButton);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Return the index of objNavItemButton in the Buttons collection
 /// </summary>
 /// <param name="objNavItemButton"></param>
 public int IndexOf(NavItemButton objNavItemButton)
 {
     return this.mobjButtons.IndexOf(objNavItemButton);
 }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="objNavItemButton"></param>
        /// <returns></returns>
        public int Add(NavItemButton objNavItemButton)
        {
            int intIndex = -1;

            if (objNavItemButton != null)
            {
                objNavItemButton.NavBar = mobjNavBar;
                objNavItemButton.InternalParent = mobjNavBar;

                intIndex = List.Add(objNavItemButton);

                //mobjNavBar.InvalidateLayout(new LayoutEventArgs(false, true, true));

                mobjNavBar.Update();

                if (ObservableItemAdded != null)
                {
                    ObservableItemAdded(this, new ObservableListEventArgs(objNavItemButton));
                }
            }

            return intIndex;
        }