/// <summary> /// Searches for the specified <see cref="ContextMenuItem"/> and returns the zero-based index of the first occurrence within the entire collection. /// </summary> /// <param name="item">The item.</param> /// <returns></returns> public int IndexOf(ContextMenuItem item) { if (item == null) { throw new ArgumentNullException("item"); } return(_contextMenuItemCollection.IndexOf(item)); }
/// <summary> /// Determines whether contains the specified item. /// </summary> /// <param name="item">The item.</param> /// <returns> /// <c>true</c> if contains the specified item; otherwise, <c>false</c>. /// </returns> public bool Contains(ContextMenuItem item) { if (item == null) { return(false); } return(_contextMenuItemCollection.Contains(item)); }
/// <summary> /// Inserts at the specified index. /// </summary> /// <param name="index">The index.</param> /// <param name="item">The item.</param> public void Insert(int index, ContextMenuItem item) { _contextMenuItemCollection[index] = item; }
/// <summary> /// Adds the specified item. /// </summary> /// <param name="item">The item.</param> /// <returns></returns> public int Add(ContextMenuItem item) { return(_contextMenuItemCollection.Add(item)); }
/// <summary> /// Removes the specified item. /// </summary> /// <param name="item">The item.</param> public void Remove(ContextMenuItem item) { _contextMenuItemCollection.Remove(item); }