Class
CheckedItemsCollection

A partially observable wrapper for the a hash set that contains the checked items of the RadTreeView.

Definition

Namespace:Telerik.Windows.Controls.TreeView

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
public class CheckedItemsCollection : ICollection<object>, IEnumerable<object>, ICollection, IEnumerable, INotifyPropertyChanged, INotifyCollectionChanged

Inheritance: objectCheckedItemsCollection

Implements: ICollectionICollection<object>IEnumerableIEnumerable<object>INotifyCollectionChangedINotifyPropertyChanged

Properties

Count

Gets the number of elements contained in the ICollection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

Implements ICollection<object>.CountICollection.Count

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Implements ICollection<object>.IsReadOnly

IsSynchronized

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

Declaration

cs-api-definition
public bool IsSynchronized { get; }

Property Value

bool

Implements ICollection.IsSynchronized

SyncRoot

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

Declaration

cs-api-definition
public object SyncRoot { get; }

Property Value

object

Implements ICollection.SyncRoot

Methods

Add(object)

Adding items to the CheckedItemsCollection is currently not supported, calling this method will throw an exception.

Declaration

cs-api-definition
public void Add(object item)

Parameters

item

object

No item will be added to the collection, regardless of the parameter.

Implements ICollection<object>.Add(object)

Clear()

The collection is Readonly, calling this method will result in an exception.

Declaration

cs-api-definition
public void Clear()

Implements ICollection<object>.Clear()

Contains(object)

Determines whether the ICollection<T> contains a specific value.

Declaration

cs-api-definition
public bool Contains(object item)

Parameters

item

object

The object to locate in the ICollection<T>.

Returns

bool

True if item is found in the ICollection<T>; otherwise, false.

Implements ICollection<object>.Contains(object)

CopyTo(Array, int)

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

Declaration

cs-api-definition
public void CopyTo(Array array, int index)

Parameters

array

Array

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

index

int

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

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than zero.

ArgumentException

<code class="paramref">array</code> is multidimensional.

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

ArgumentException

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

Implements ICollection.CopyTo(Array, int)

CopyTo(object[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

Declaration

cs-api-definition
public void CopyTo(object[] array, int arrayIndex)

Parameters

array

object[]

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

arrayIndex

int

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

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

<code class="paramref">array</code> is multidimensional.

-or- arrayIndex is equal to or greater than the length of array. -or- The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

Implements ICollection<object>.CopyTo(object[], int)

GetCheckedItemsOnly()

Returns the items from the collection that have a ToggleState.On and excludes items with ToggleState.Indeterminate.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "The method implies that the return value involves computation.")]
public IEnumerator<object> GetCheckedItemsOnly()

Returns

IEnumerator<object>

An enumerator that returns only the checked items which are not in indeterminate state.

GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration

cs-api-definition
public IEnumerator GetEnumerator()

Returns

IEnumerator

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

Implements IEnumerable.GetEnumerator()

Remove(object)

The CheckedItems collection is read-only and cannot be modified.

Declaration

cs-api-definition
public bool Remove(object item)

Parameters

item

object

No item will be remove, the collection is read-only.

Returns

bool

Always returns false.

Implements ICollection<object>.Remove(object)

Events

CollectionChanged

Raised when the CheckedItems change. Currently it is only raised with 'Reset' since the set of items in unordered.

Declaration

cs-api-definition
public event NotifyCollectionChangedEventHandler CollectionChanged

Event Value

NotifyCollectionChangedEventHandler

Implements INotifyCollectionChanged.CollectionChanged

PropertyChanged

Raised when a property changes on the object.

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged