WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ButtonEdit.VisualItemCollection

    Show / Hide Table of Contents

    Class ButtonEdit.VisualItemCollection

    Collection of VisualItem objects.

    Inheritance
    System.Object
    System.Collections.CollectionBase
    ButtonEdit.VisualItemCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    System.Collections.CollectionBase.Clear()
    System.Collections.CollectionBase.RemoveAt(System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.CollectionBase.GetEnumerator()
    System.Collections.CollectionBase.OnSet(System.Int32, System.Object, System.Object)
    System.Collections.CollectionBase.OnInsert(System.Int32, System.Object)
    System.Collections.CollectionBase.OnRemove(System.Int32, System.Object)
    System.Collections.CollectionBase.OnValidate(System.Object)
    System.Collections.CollectionBase.OnSetComplete(System.Int32, System.Object, System.Object)
    System.Collections.CollectionBase.OnClearComplete()
    System.Collections.CollectionBase.InnerList
    System.Collections.CollectionBase.List
    System.Collections.CollectionBase.Capacity
    System.Collections.CollectionBase.Count
    System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
    System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
    System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
    System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
    System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
    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
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class VisualItemCollection : CollectionBase, IList, ICollection, IEnumerable
    Remarks

    The collection of VisualItem controls that make up the Buttons property of the ButtonEdit class.

    You will not need to use this class directly.

    Constructors

    VisualItemCollection(ButtonEdit)

    Creates an object of type ButtonEdit.VisualItemCollection.

    Declaration
    public VisualItemCollection(ButtonEdit owner)
    Parameters
    Type Name Description
    ButtonEdit owner

    The ButtonEdit object that owns this collection.

    Remarks

    The ButtonEdit class that owns this collection is passed in as a parameter and this collection class will use this reference to the owner to inform it to add a Button control or remove a Button control when an item is added or removed to the collection.

    Properties

    Item[Int32]

    Gets / sets the Indexer property for ButtonEdit.ButtonEditChildButtonCollection

    Declaration
    public VisualItem this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    VisualItem
    Remarks

    This allows the ButtonEditChildButtons to be accessed through the indexer.

    Methods

    Add(VisualItem)

    Adds a VisualItem to the collection.

    Declaration
    public int Add(VisualItem button)
    Parameters
    Type Name Description
    VisualItem button

    The object to be added.

    Returns
    Type Description
    System.Int32

    The index of the object in the collection.

    Remarks

    Add an item to the internal List object results in the OnInsertComplete(Int32, Object) method being invoked.

    Contains(VisualItem)

    Indicates whether an object exists in this collection.

    Declaration
    public bool Contains(VisualItem button)
    Parameters
    Type Name Description
    VisualItem button

    The object to check for.

    Returns
    Type Description
    System.Boolean

    True if the object exists in this collection; false otherwise.

    Remarks

    This method is used for checking if an item exists in the collection before trying to delete or change that item.

    CopyTo(VisualItem[], Int32)

    Copies elements of this collection to another collection starting at an index.

    Declaration
    public void CopyTo(VisualItem[] array, int index)
    Parameters
    Type Name Description
    VisualItem[] array

    The array to be copied to.

    System.Int32 index

    The index to begin from.

    Remarks

    The internal List copies the child buttons to the new array passed in.

    OnClear()

    Declaration
    protected override void OnClear()
    Overrides
    System.Collections.CollectionBase.OnClear()

    OnInsertComplete(Int32, Object)

    Derived handler for the InsertComplete event.

    Declaration
    protected override void OnInsertComplete(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the inserted item.

    System.Object value

    The object that was inserted.

    Overrides
    System.Collections.CollectionBase.OnInsertComplete(System.Int32, System.Object)
    Remarks

    Be sure to call the base class implementation of this method if overriding.

    The owner (the ButtonEdit) control is instructed to insert a new ButtonEditChildButton.

    OnRemoveComplete(Int32, Object)

    Derived handler for the RemoveComplete event.

    Declaration
    protected override void OnRemoveComplete(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the inserted item.

    System.Object value

    The object that was inserted.

    Overrides
    System.Collections.CollectionBase.OnRemoveComplete(System.Int32, System.Object)
    Remarks

    The owner is informed by the collection to re-layout itself to accommodate the change.

    Remove(VisualItem)

    Removes aVisualItem object from the collection.

    Declaration
    public void Remove(VisualItem button)
    Parameters
    Type Name Description
    VisualItem button

    The VisualItem that is to be removed from the collection.

    Remarks

    Removes the VisualItem from the internal List object if the VisualItem exists.

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    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