menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BarItems - API Reference

    Show / Hide Table of Contents

    Class BarItems

    Represents a collection of BarItem objects.

    Inheritance
    System.Object
    System.Collections.ArrayList
    ArrayListExt
    VisuallyInheritableList
    BarItems
    BarItemsDesignTime
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ICloneable
    System.IDisposable
    Inherited Members
    VisuallyInheritableList.ReinitBaseClassCopy()
    VisuallyInheritableList.ShouldContinueIfItemsCountChanged()
    VisuallyInheritableList.SetDesignTimeChanges(ArrayList)
    VisuallyInheritableList.GetDesignTimeChanges()
    VisuallyInheritableList.IsIdenticalObjects(Object, Object)
    VisuallyInheritableList.OnCollectionChanging()
    VisuallyInheritableList.OnCollectionChanged(CollectionChangeEventArgs)
    VisuallyInheritableList.Parent
    VisuallyInheritableList.DesignTimeChanges
    ArrayListExt.RaiseCollectionChanged(CollectionChangeEventArgs)
    ArrayListExt.RemoveRange(Int32, Int32)
    ArrayListExt.Sort(Int32, Int32, IComparer)
    ArrayListExt.Reverse(Int32, Int32)
    ArrayListExt.Move(Int32, Int32, Int32)
    ArrayListExt.SuspendEvents()
    ArrayListExt.ResumeEvents(Boolean)
    ArrayListExt.ForceReadOnly
    ArrayListExt.ForceFixedSize
    ArrayListExt.IsFixedSize
    ArrayListExt.IsReadOnly
    ArrayListExt.IsCollectionChangedEventSuspended
    ArrayListExt.CollectionChanged
    ArrayListExt.ItemPropertyChanged
    System.Collections.ArrayList.Adapter(System.Collections.IList)
    System.Collections.ArrayList.AddRange(System.Collections.ICollection)
    System.Collections.ArrayList.BinarySearch(System.Int32, System.Int32, System.Object, System.Collections.IComparer)
    System.Collections.ArrayList.BinarySearch(System.Object)
    System.Collections.ArrayList.BinarySearch(System.Object, System.Collections.IComparer)
    System.Collections.ArrayList.Clone()
    System.Collections.ArrayList.Contains(System.Object)
    System.Collections.ArrayList.CopyTo(System.Array)
    System.Collections.ArrayList.CopyTo(System.Array, System.Int32)
    System.Collections.ArrayList.CopyTo(System.Int32, System.Array, System.Int32, System.Int32)
    System.Collections.ArrayList.FixedSize(System.Collections.IList)
    System.Collections.ArrayList.FixedSize(System.Collections.ArrayList)
    System.Collections.ArrayList.GetEnumerator()
    System.Collections.ArrayList.GetEnumerator(System.Int32, System.Int32)
    System.Collections.ArrayList.IndexOf(System.Object)
    System.Collections.ArrayList.IndexOf(System.Object, System.Int32)
    System.Collections.ArrayList.IndexOf(System.Object, System.Int32, System.Int32)
    System.Collections.ArrayList.LastIndexOf(System.Object)
    System.Collections.ArrayList.LastIndexOf(System.Object, System.Int32)
    System.Collections.ArrayList.LastIndexOf(System.Object, System.Int32, System.Int32)
    System.Collections.ArrayList.ReadOnly(System.Collections.IList)
    System.Collections.ArrayList.ReadOnly(System.Collections.ArrayList)
    System.Collections.ArrayList.Repeat(System.Object, System.Int32)
    System.Collections.ArrayList.Reverse()
    System.Collections.ArrayList.SetRange(System.Int32, System.Collections.ICollection)
    System.Collections.ArrayList.GetRange(System.Int32, System.Int32)
    System.Collections.ArrayList.Sort()
    System.Collections.ArrayList.Sort(System.Collections.IComparer)
    System.Collections.ArrayList.Synchronized(System.Collections.IList)
    System.Collections.ArrayList.Synchronized(System.Collections.ArrayList)
    System.Collections.ArrayList.ToArray()
    System.Collections.ArrayList.ToArray(System.Type)
    System.Collections.ArrayList.TrimToSize()
    System.Collections.ArrayList.Capacity
    System.Collections.ArrayList.Count
    System.Collections.ArrayList.IsSynchronized
    System.Collections.ArrayList.SyncRoot
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Tools.XPMenus
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class BarItems : VisuallyInheritableList, IList, ICollection, IEnumerable, ICloneable, IDisposable
    Remarks

    This class represents a collection of BarItem objects stored in a BarManager, ParentBarItem or XPToolBar.

    Examples

    Take a look at our XPMenus samples under the Tools\Samples\Menus Package folder for usage example.

    Constructors

    BarItems()

    Overloaded. The constructor that instantiates a BarItems class.

    Declaration
    public BarItems()

    BarItems(BarItem[])

    The constructor that instantiates a BarItems class and intializes it with the supplied array of BarItems.

    Declaration
    public BarItems(BarItem[] barItems)
    Parameters
    Type Name Description
    BarItem[] barItems

    An array of BarItem(s).

    BarItems(BarManager)

    The constructor that instantiates a BarItems class and sets its BarManager to the specified BarManager.

    Declaration
    public BarItems(BarManager manager)
    Parameters
    Type Name Description
    BarManager manager

    A BarManager instance.

    Properties

    Item[BarItemID]

    Returns a BarItem based on it's BarItemId.

    Declaration
    public BarItem this[BarItemID barItemId] { get; }
    Parameters
    Type Name Description
    BarItemID barItemId
    Property Value
    Type Description
    BarItem

    Item[Int32]

    Gets or sets a reference to the BarItem at the specified index location in the BarItems object. In C#, this property is the indexer for the BarItems class.

    Declaration
    public BarItem this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The location of the BarItem in the BarItems collection.

    Property Value
    Type Description
    BarItem

    The reference to the BarItem.

    Item[String]

    Returns a BarItem based on it's BarItemId string.

    Declaration
    public BarItem this[string barItemId] { get; }
    Parameters
    Type Name Description
    System.String barItemId
    Property Value
    Type Description
    BarItem

    Manager

    Gets or sets the BarManager to which this collection will be associated with.

    Declaration
    public BarManager Manager { get; set; }
    Property Value
    Type Description
    BarManager
    Remarks

    The BarManager to which this BarItems collection will be associated with.

    When this collection is associated with a BarManager, all the existing and any newly added BarItem child's Manager property will be reset to this Manager property.

    Methods

    Add(Object)

    Override. See Add(Object).

    Declaration
    public override int Add(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    System.Int32
    Overrides
    ArrayListExt.Add(Object)

    AddHandlers(Object)

    Declaration
    protected override void AddHandlers(object item)
    Parameters
    Type Name Description
    System.Object item
    Overrides
    ArrayListExt.AddHandlers(Object)

    AddRange(BarItem[])

    Adds an array of BarItem objects to the collection.

    Declaration
    public virtual void AddRange(BarItem[] items)
    Parameters
    Type Name Description
    BarItem[] items

    An array of BarItem objects to add to the collection.

    Clear()

    To clear the BarItem.

    Declaration
    public override void Clear()
    Overrides
    ArrayListExt.Clear()

    Dispose()

    Declaration
    public virtual void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    FindItem(String)

    Overloaded. Finds a BarItem in the list given it's ID.

    Declaration
    public BarItem FindItem(string id)
    Parameters
    Type Name Description
    System.String id

    The BarItem's ID.

    Returns
    Type Description
    BarItem

    A BarItem with the specified ID. Null, if not found.

    FindItem(String, Int32)

    Finds a BarItem in the list given it's text and categoryIndex value.

    Declaration
    public BarItem FindItem(string text, int categoryIndex)
    Parameters
    Type Name Description
    System.String text

    The BarItem's text value.

    System.Int32 categoryIndex

    The BarItem's category Index value.

    Returns
    Type Description
    BarItem

    A BarItem with the specified text and categoryIndex. Null, if not found.

    Remarks

    If there are multiple bar items with the same text and categoryindex value, then the BarItem returned will be one of those in random.

    FindMergePosition(Int32)

    Declaration
    public virtual int FindMergePosition(int mergeOrder)
    Parameters
    Type Name Description
    System.Int32 mergeOrder
    Returns
    Type Description
    System.Int32

    FindNestedItem(String)

    Finds the nested BarItem in XPToolbar.

    Declaration
    public BarItem FindNestedItem(string id)
    Parameters
    Type Name Description
    System.String id

    The baritem ID.

    Returns
    Type Description
    BarItem

    The baritem containing the id

    Remarks

    The method can be used to iterate through all items in XPToolBar to find the item containing the mentioned ID.

    GetItemFromHotKey(Char)

    Returns the BarItem that has this hotkey in the list, if any.

    Declaration
    public BarItem GetItemFromHotKey(char hotkey)
    Parameters
    Type Name Description
    System.Char hotkey

    The hotkey for which to retrieve the BarItem.

    Returns
    Type Description
    BarItem

    The BarItem if found; null otherwise.

    Insert(Int32, Object)

    Override. See Insert(Int32, Object).

    Declaration
    public override void Insert(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object value
    Overrides
    ArrayListExt.Insert(Int32, Object)

    InsertRange(Int32, ICollection)

    Override. See InsertRange(Int32, ICollection).

    Declaration
    public override void InsertRange(int index, ICollection c)
    Parameters
    Type Name Description
    System.Int32 index
    System.Collections.ICollection c
    Overrides
    ArrayListExt.InsertRange(Int32, ICollection)

    IsValidItemID(BarItem, String)

    Tests whether a BarItem will be unique when added to this list with the specified text and categoryID. A reference to the BarItem itself is passed so that the BarItem if already in the list will be ignored in the test for uniqueness.

    Declaration
    public bool IsValidItemID(BarItem itemToValidate, string newID)
    Parameters
    Type Name Description
    BarItem itemToValidate

    The BarItem to validate for uniqueness.

    System.String newID

    The text value of the BarItem when it will get added to the list.

    Returns
    Type Description
    System.Boolean

    True if the BarItem will make a unique entry in the list; false if not.

    OnItemPropertyChanged(Object, SyncfusionPropertyChangedEventArgs)

    Overridden. See OnItemPropertyChanged(Object, SyncfusionPropertyChangedEventArgs).

    Declaration
    protected override void OnItemPropertyChanged(object sender, SyncfusionPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    Event sender.

    SyncfusionPropertyChangedEventArgs e

    Event data.

    Overrides
    ArrayListExt.OnItemPropertyChanged(Object, SyncfusionPropertyChangedEventArgs)

    ReleaseHandler(Object)

    Declaration
    protected override void ReleaseHandler(object item)
    Parameters
    Type Name Description
    System.Object item
    Overrides
    ArrayListExt.ReleaseHandler(Object)

    Remove(Object)

    To remove the BarItem.

    Declaration
    public override void Remove(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Overrides
    System.Collections.ArrayList.Remove(System.Object)

    RemoveAt(Int32)

    To remove the bar item based on index.

    Declaration
    public override void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Overrides
    ArrayListExt.RemoveAt(Int32)

    RemoveHashInfoForItem(BarItem)

    Declaration
    protected void RemoveHashInfoForItem(BarItem barItem)
    Parameters
    Type Name Description
    BarItem barItem

    StoreHashInfoForItem(BarItem)

    Declaration
    protected void StoreHashInfoForItem(BarItem item)
    Parameters
    Type Name Description
    BarItem item

    UpdateItemPositions(BarItem)

    Declaration
    protected virtual void UpdateItemPositions(BarItem updatedItem)
    Parameters
    Type Name Description
    BarItem updatedItem

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ICloneable
    System.IDisposable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.MoveTo(IList, Int32, Int32)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved