New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
public class RadToastNotificationCollection : List<RadToastNotification>, IList, ICollection, IEnumerable

Inheritance: objectList<RadToastNotification>RadToastNotificationCollection

Implements: ICollectionIEnumerableIList

Constructors

Default constructor.

C#
public RadToastNotificationCollection()

Copy constructor that supports shallow and deep copy.

C#
public RadToastNotificationCollection(IList<RadToastNotification> toastNotifications, bool deepCopy = true)
Parameters:toastNotificationsIList<RadToastNotification>

A list of toast notifications to copy.

deepCopybool

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

Properties

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

C#
public RadToastNotification this[int index] { get; set; }
Parameters:indexint

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

Property Value:RadToastNotification

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

C#
public RadToastNotification this[string name] { get; }
Parameters:namestringNameProperty Value:RadToastNotification

Methods

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

C#
public void Add(RadToastNotification item)
Parameters:itemRadToastNotification

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

C#
public void AddRange(IEnumerable<RadToastNotification> collection)
Parameters:collectionIEnumerable<RadToastNotification>

The given collection

Clears all RadToastNotifications from the collection.

C#
public void Clear()

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

C#
public void Insert(int index, RadToastNotification item)
Parameters:indexint

The given index

itemRadToastNotificationRadToastNotification

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

C#
public void InsertRange(int index, IEnumerable<RadToastNotification> collection)
Parameters:indexint

The given index

collectionIEnumerable<RadToastNotification>

The given collection

Removes a given RadToastNotification from the collection.

C#
public bool Remove(RadToastNotification item)
Parameters:itemRadToastNotificationRadToastNotificationReturns:

bool

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

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

C#
public int RemoveAll(Predicate<RadToastNotification> match)
Parameters:matchPredicate<RadToastNotification>

The delegate that defines the conditions of the elements to remove

Returns:

int

The number of elements removed

Removes a RadToastNotification at the given index.

C#
public void RemoveAt(int index)
Parameters:indexint

The given index

Removes a range of RadToastNotifications from the collection.

C#
public void RemoveRange(int index, int count)
Parameters:indexint

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

countint

The number of RadToastNotifications to remove.