Class
ObservableUIElementCollection

Represents an ordered and observable collection of UIElements.

Definition

Namespace:Telerik.Windows.Controls.Carousel

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface", Justification = "No need in this case.")]
public class ObservableUIElementCollection : UIElementCollection, INotifyCollectionChanged

Inheritance: objectObservableUIElementCollection

Implements: INotifyCollectionChanged

Constructors

Initializes a new instance of the ObservableUIElementCollection class.

Declaration

cs-api-definition
public ObservableUIElementCollection(UIElement visualParent, FrameworkElement logicalParent)

Parameters

visualParent

UIElement

The UIElement parent of the collection.

logicalParent

FrameworkElement

The logical parent of the elements in the collection.

Properties

Gets or sets the UIElement at the specified index.

Declaration

cs-api-definition
public override UIElement this[int index] { get; set; }

Parameters

index

int

Property Value

UIElement

Methods

Adds the specified element to the UIElementCollection.

Declaration

cs-api-definition
public override int Add(UIElement element)

Parameters

element

UIElement

The UIElement to add.

Returns

int

The index position of the added element.

Removes all elements from a UIElementCollection.

Declaration

cs-api-definition
public override void Clear()

Inserts an element into a UIElementCollection at the specified index position.

Declaration

cs-api-definition
public override void Insert(int index, UIElement element)

Parameters

index

int

The index position where you want to insert the element.

element

UIElement

The element to insert into the UIElementCollection.

Raises the event.

Declaration

cs-api-definition
protected void OnCollectionChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Removes the specified element from a UIElementCollection.

Declaration

cs-api-definition
public override void Remove(UIElement element)

Parameters

element

UIElement

The element to remove from the collection.

Removes the UIElement at the specified index.

Declaration

cs-api-definition
public override void RemoveAt(int index)

Parameters

index

int

The index of the UIElement that you want to remove.

Removes a range of elements from a UIElementCollection.

Declaration

cs-api-definition
public override void RemoveRange(int index, int count)

Parameters

index

int

The index position of the element where removal begins.

count

int

The number of elements to remove.

Events

Occurs when the collection changes.

Declaration

cs-api-definition
public event NotifyCollectionChangedEventHandler CollectionChanged

Event Value

NotifyCollectionChangedEventHandler

Implements INotifyCollectionChanged.CollectionChanged