Class
RadToastNotificationCollection

A collection of RadToastNotification. Supports unique names. Can access a RadToastNotification through its name. Names must be unique.

Definition

Namespace:Telerik.RadToastNotificationManager

Assembly:Telerik.WinControls.RadToastNotification.dll

Syntax:

cs-api-definition
public class RadToastNotificationCollection : List<RadToastNotification>, IList, ICollection, IEnumerable

Inheritance: objectList<RadToastNotification>RadToastNotificationCollection

Implements: ICollectionIEnumerableIList

Constructors

RadToastNotificationCollection()

Default constructor.

Declaration

cs-api-definition
public RadToastNotificationCollection()

RadToastNotificationCollection(IList<RadToastNotification>, bool)

Copy constructor that supports shallow and deep copy.

Declaration

cs-api-definition
public RadToastNotificationCollection(IList<RadToastNotification> toastNotifications, bool deepCopy = true)

Parameters

toastNotifications

IList<RadToastNotification>

A list of toast notifications to copy.

deepCopy

bool

True to use deep copy, false to use shallow copy. Deep copy is default.

Properties

this[int]

Gets or sets the toast notification at the specified index. Throws RadToastNotificationInvalidNameException if the name is not unique.

Declaration

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

Parameters

index

int

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

Property Value

RadToastNotification

RadToastNotification

this[string]

Gets a toast based on its name. Return null if the name does not exist in the collection.

Declaration

cs-api-definition
public RadToastNotification this[string name] { get; }

Parameters

name

string

Name

Property Value

RadToastNotification

RadToastNotification

Methods

Add(RadToastNotification)

Adds a RadToastNotification to the end of the collection, if the name is unique. Throws RadToastNotificationInvalidNameException if the name is not unique.

Declaration

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

Parameters

item

RadToastNotification

AddRange(IEnumerable<RadToastNotification>)

Adds the RadToastNotifications of the given collection to the end of the RadToastNotificationCollection. Throws RadToastNotificationInvalidNameException if one of the names is not unique.

Declaration

cs-api-definition
public void AddRange(IEnumerable<RadToastNotification> collection)

Parameters

collection

IEnumerable<RadToastNotification>

The given collection

Clear()

Clears all RadToastNotifications from the collection.

Declaration

cs-api-definition
public void Clear()

Insert(int, RadToastNotification)

Inserts a RadToastNotification into the collection at the specified index. Throws RadToastNotificationInvalidNameException if the name is not unique.

Declaration

cs-api-definition
public void Insert(int index, RadToastNotification item)

Parameters

index

int

The given index

item

RadToastNotification

RadToastNotification

InsertRange(int, IEnumerable<RadToastNotification>)

Adds the RadToastNotifications of the given collection at the specified index. Throws RadToastNotificationInvalidNameException if one of the names is not unique.

Declaration

cs-api-definition
public void InsertRange(int index, IEnumerable<RadToastNotification> collection)

Parameters

index

int

The given index

collection

IEnumerable<RadToastNotification>

The given collection

Remove(RadToastNotification)

Removes a given RadToastNotification from the collection.

Declaration

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

Parameters

item

RadToastNotification

RadToastNotification

Returns

bool

True if RadToastNotification is successfully removed; otherwise, false. This method also returns false if RadToastNotification was not found in the collection.

RemoveAll(Predicate<RadToastNotification>)

Removes all the RadToastNotifications that match the conditions defined by the specified predicate.

Declaration

cs-api-definition
public int RemoveAll(Predicate<RadToastNotification> match)

Parameters

match

Predicate<RadToastNotification>

The delegate that defines the conditions of the elements to remove

Returns

int

The number of elements removed

RemoveAt(int)

Removes a RadToastNotification at the given index.

Declaration

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

Parameters

index

int

The given index

RemoveRange(int, int)

Removes a range of RadToastNotifications from the collection.

Declaration

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

Parameters

index

int

The zero-based starting index of the range of RadToastNotifications to remove.

count

int

The number of RadToastNotifications to remove.