WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DocumentCollection

    Show / Hide Table of Contents

    Class DocumentCollection

    Collection, used to store documents.

    Inheritance
    System.Object
    DocumentCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.Collections.Specialized.INotifyCollectionChanged
    System.ComponentModel.ICollectionViewFactory
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    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.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public class DocumentCollection : IList, ICollection, IEnumerable, INotifyCollectionChanged, ICollectionViewFactory, INotifyPropertyChanged

    Constructors

    DocumentCollection()

    Initializes a new instance of the DocumentCollection class.

    Declaration
    public DocumentCollection()

    Properties

    Count

    Gets count of the items in collection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Data

    Gets source collection or internal data list - depending on the presence of the source collection.

    Declaration
    protected IEnumerable Data { get; }
    Property Value
    Type Description
    System.Collections.IEnumerable

    The data source.

    IsFixedSize

    Gets a value indicating whether the System.Collections.IList has a fixed size.

    Declaration
    public bool IsFixedSize { get; }
    Property Value
    Type Description
    System.Boolean

    true if the System.Collections.IList has a fixed size; otherwise, false.

    IsReadOnly

    Gets a value indicating whether the System.Collections.IList is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    System.Boolean

    true if the System.Collections.IList is read-only; otherwise, false.

    IsSynchronized

    Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).

    Declaration
    public bool IsSynchronized { get; }
    Property Value
    Type Description
    System.Boolean

    true if access to the System.Collections.ICollection is synchronized (thread safe); otherwise, false.

    Item[Int32]

    Gets or sets the element at the specified index.

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

    The zero-based index of the element to get or set.

    Property Value
    Type Description
    System.Object

    The element at the specified index.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is not a valid index in the System.Collections.IList.

    SourceCollection

    Gets or sets custom source collection.

    Declaration
    public IEnumerable SourceCollection { get; set; }
    Property Value
    Type Description
    System.Collections.IEnumerable

    SyncRoot

    Gets an object that can be used to synchronize access to the System.Collections.ICollection.

    Declaration
    public object SyncRoot { get; }
    Property Value
    Type Description
    System.Object

    An object that can be used to synchronize access to the System.Collections.ICollection.

    Methods

    Add(Object)

    Adds an item to the System.Collections.IList.

    Declaration
    public int Add(object value)
    Parameters
    Type Name Description
    System.Object value

    The System.Object to add to the System.Collections.IList.

    Returns
    Type Description
    System.Int32

    The position into which the new element was inserted.

    Exceptions
    Type Condition
    System.NotSupportedException

    The System.Collections.IList is read-only.-or- The System.Collections.IList has a fixed size.

    Clear()

    Removes all items from the System.Collections.IList.

    Declaration
    public void Clear()
    Exceptions
    Type Condition
    System.NotSupportedException

    The System.Collections.IList is read-only.

    Contains(Object)

    Determines whether the System.Collections.IList contains a specific value.

    Declaration
    public bool Contains(object value)
    Parameters
    Type Name Description
    System.Object value

    The System.Object to locate in the System.Collections.IList.

    Returns
    Type Description
    System.Boolean

    true if the System.Object is found in the System.Collections.IList; otherwise, false.

    CopyTo(Array, Int32)

    Copies the elements of the System.Collections.ICollection to an System.Array, starting at a particular System.Array index.

    Declaration
    public void CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array

    The one-dimensional System.Array that is the destination of the elements copied from System.Collections.ICollection. The System.Array must have zero-based indexing.

    System.Int32 index

    The zero-based index in array at which copying begins.

    Exceptions
    Type Condition
    System.ArgumentNullException

    array is null.

    System.ArgumentException

    The type of the source System.Collections.ICollection cannot be cast automatically to the type of the destination array.

    System.ArgumentOutOfRangeException

    index is less than zero.

    System.ArgumentException

    array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source System.Collections.ICollection is greater than the available space from index to the end of the destination array.

    CreateView()

    Creates a new view on the collection that implements this interface. Typically, user code does not call this method.

    Declaration
    public ICollectionView CreateView()
    Returns
    Type Description
    System.ComponentModel.ICollectionView

    The newly created view.

    GetEnumerator()

    Returns an enumerator that iterates through a collection.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An System.Collections.IEnumerator object that can be used to iterate through the collection.

    IndexOf(Object)

    Determines the index of a specific item in the System.Collections.IList.

    Declaration
    public int IndexOf(object value)
    Parameters
    Type Name Description
    System.Object value

    The System.Object to locate in the System.Collections.IList.

    Returns
    Type Description
    System.Int32

    The index of value if found in the list; otherwise, -1.

    Insert(Int32, Object)

    Inserts an item to the System.Collections.IList at the specified index.

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

    The zero-based index at which value should be inserted.

    System.Object value

    The System.Object to insert into the System.Collections.IList.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is not a valid index in the System.Collections.IList.

    System.NotSupportedException

    The System.Collections.IList is read-only.-or- The System.Collections.IList has a fixed size.

    System.NullReferenceException

    value is null reference in the System.Collections.IList.

    Remove(Object)

    Removes the first occurrence of a specific object from the System.Collections.IList.

    Declaration
    public void Remove(object value)
    Parameters
    Type Name Description
    System.Object value

    The System.Object to remove from the System.Collections.IList.

    Exceptions
    Type Condition
    System.NotSupportedException

    The System.Collections.IList is read-only.-or- The System.Collections.IList has a fixed size.

    RemoveAt(Int32)

    Removes the System.Collections.IList item at the specified index.

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

    The zero-based index of the item to remove.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is not a valid index in the System.Collections.IList.

    System.NotSupportedException

    The System.Collections.IList is read-only.-or- The System.Collections.IList has a fixed size.

    Events

    CollectionChanged

    Occurs when the collection changes.

    Declaration
    public event NotifyCollectionChangedEventHandler CollectionChanged
    Event Type
    Type Description
    System.Collections.Specialized.NotifyCollectionChangedEventHandler

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.Collections.Specialized.INotifyCollectionChanged
    System.ComponentModel.ICollectionViewFactory
    System.ComponentModel.INotifyPropertyChanged
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved