ClassRadToastNotificationCollection
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
RadToastNotificationCollection()
Default constructor.
Declaration
public RadToastNotificationCollection()
RadToastNotificationCollection(IList<RadToastNotification>, bool)
Copy constructor that supports shallow and deep copy.
Declaration
public RadToastNotificationCollection(IList<RadToastNotification> toastNotifications, bool deepCopy = true)
Parameters
toastNotifications
IList<RadToastNotification>
A list of toast notifications to copy.
deepCopy
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
public RadToastNotification this[int index] { get; set; }
Parameters
index
The zero-based index of the toast notification to get or set.
Property Value
RadToastNotificationthis[string]
Gets a toast based on its name. Return null if the name does not exist in the collection.
Declaration
public RadToastNotification this[string name] { get; }
Parameters
name
NameProperty Value
RadToastNotificationMethods
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
public void Add(RadToastNotification item)
Parameters
item
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
public void AddRange(IEnumerable<RadToastNotification> collection)
Parameters
collection
IEnumerable<RadToastNotification>
The given collection
Clear()
Clears all RadToastNotifications from the collection.
Declaration
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
public void Insert(int index, RadToastNotification item)
Parameters
index
The given index
item
RadToastNotificationInsertRange(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
public void InsertRange(int index, IEnumerable<RadToastNotification> collection)
Parameters
index
The given index
collection
IEnumerable<RadToastNotification>
The given collection
Remove(RadToastNotification)
Removes a given RadToastNotification from the collection.
Declaration
public bool Remove(RadToastNotification item)
Parameters
item
RadToastNotificationReturns
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
public int RemoveAll(Predicate<RadToastNotification> match)
Parameters
match
Predicate<RadToastNotification>
The delegate that defines the conditions of the elements to remove
Returns
The number of elements removed
RemoveAt(int)
Removes a RadToastNotification at the given index.
RemoveRange(int, int)
Removes a range of RadToastNotifications from the collection.