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:
public class RadToastNotificationCollection : List<RadToastNotification>, IList, ICollection, IEnumerable
Inheritance: objectList<RadToastNotification>RadToastNotificationCollection
Implements:
Constructors
Default constructor.
public RadToastNotificationCollection()
Copy constructor that supports shallow and deep copy.
public RadToastNotificationCollection(IList<RadToastNotification> toastNotifications, bool deepCopy = true)
A list of toast notifications to copy.
deepCopyboolTrue 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.
public RadToastNotification this[int index] { get; set; }
The zero-based index of the toast notification to get or set.
Property Value:RadToastNotificationGets a toast based on its name. Return null if the name does not exist in the collection.
public RadToastNotification this[string name] { get; }
Methods
Adds a RadToastNotification to the end of the collection, if the name is unique. Throws RadToastNotificationInvalidNameException if the name is not unique.
Adds the RadToastNotifications of the given collection to the end of the RadToastNotificationCollection. Throws RadToastNotificationInvalidNameException if one of the names is not unique.
public void AddRange(IEnumerable<RadToastNotification> collection)
The given collection
Clears all RadToastNotifications from the collection.
public void Clear()
Inserts a RadToastNotification into the collection at the specified index. Throws RadToastNotificationInvalidNameException if the name is not unique.
public void Insert(int index, RadToastNotification item)
The given index
itemRadToastNotificationRadToastNotificationAdds the RadToastNotifications of the given collection at the specified index. Throws RadToastNotificationInvalidNameException if one of the names is not unique.
public void InsertRange(int index, IEnumerable<RadToastNotification> collection)
The given index
collectionIEnumerable<RadToastNotification>The given collection
Removes a given RadToastNotification from the collection.
public bool Remove(RadToastNotification item)
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.
public int RemoveAll(Predicate<RadToastNotification> match)
The delegate that defines the conditions of the elements to remove
Returns:The number of elements removed
Removes a RadToastNotification at the given index.