Class RadToastNotificationCollection
A collection of RadToastNotification. Supports unique names. Can access a RadToastNotification through its name. Names must be unique.
Inheritance
Inherited Members
Namespace: Telerik.RadToastNotificationManager
Assembly: Telerik.WinControls.RadToastNotification.dll
Syntax
public class RadToastNotificationCollection : List<RadToastNotification>, IList<RadToastNotification>, ICollection<RadToastNotification>, IList, ICollection, IReadOnlyList<RadToastNotification>, IReadOnlyCollection<RadToastNotification>, IEnumerable<RadToastNotification>, IEnumerable
Constructors
RadToastNotificationCollection()
Default constructor.
Declaration
public RadToastNotificationCollection()
RadToastNotificationCollection(IList<RadToastNotification>, Boolean)
Copy copntructor that supports shallow and deep copy.
Declaration
public RadToastNotificationCollection(IList<RadToastNotification> toastNotifications, bool deepCopy = true)
Parameters
System.Collections.Generic.IList<RadToastNotification>
toastNotifications
A list of toast notifications to copy. |
System.Boolean
deepCopy
True to use deep copy, false to use shallow copy. Deep copy is default. |
Properties
Item[Int32]
Gets or sets the toast notification at the specified index. Throws Telerik.RadToastNotificationManager.RadToastNotificationInvalidNameException if the name is not unique.
Declaration
public RadToastNotification this[int index] { get; set; }
Parameters
System.Int32
index
The zero-based index of the toast notification to get or set. |
Property Value
RadToastNotification |
Item[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
System.String name |
Property Value
RadToastNotification |
Methods
Add(RadToastNotification)
Adds a RadToastNotification to the end of the collection, if the name is unique. Throws Telerik.RadToastNotificationManager.RadToastNotificationInvalidNameException if the name is not unique.
Declaration
public void Add(RadToastNotification item)
Parameters
RadToastNotification
item
|
AddRange(IEnumerable<RadToastNotification>)
Adds the RadToastNotifications of the given collection to the end of the RadToastNotificationCollection. Throws Telerik.RadToastNotificationManager.RadToastNotificationInvalidNameException if one of the names is not unique.
Declaration
public void AddRange(IEnumerable<RadToastNotification> collection)
Parameters
System.Collections.Generic.IEnumerable<RadToastNotification>
collection
The given collection |
Clear()
Clears all RadToastNotifications from the collection.
Declaration
public void Clear()
Insert(Int32, RadToastNotification)
Inserts a RadToastNotification into the collection at the specified index. Throws Telerik.RadToastNotificationManager.RadToastNotificationInvalidNameException if the name is not unique.
Declaration
public void Insert(int index, RadToastNotification item)
Parameters
System.Int32
index
The given index |
RadToastNotification item |
InsertRange(Int32, IEnumerable<RadToastNotification>)
Adds the RadToastNotifications of the given collection at the specified index. Throws Telerik.RadToastNotificationManager.RadToastNotificationInvalidNameException if one of the names is not unique.
Declaration
public void InsertRange(int index, IEnumerable<RadToastNotification> collection)
Parameters
System.Int32
index
The given index |
System.Collections.Generic.IEnumerable<RadToastNotification>
collection
The given collection |
Remove(RadToastNotification)
Removes a given RadToastNotification from the collection.
Declaration
public bool Remove(RadToastNotification item)
Parameters
RadToastNotification item |
Returns
System.Boolean
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
System.Predicate<RadToastNotification>
match
The delegate that defines the conditions of the elements to remove |
Returns
System.Int32
The number of elements removed |
RemoveAt(Int32)
Removes a RadToastNotification at the given index.
Declaration
public void RemoveAt(int index)
Parameters
System.Int32
index
The given index |
RemoveRange(Int32, Int32)
Removes a range of RadToastNotifications from the collection.
Declaration
public void RemoveRange(int index, int count)
Parameters
System.Int32
index
The zero-based starting index of the range of RadToastNotifications to remove. |
System.Int32
count
The number of RadToastNotifications to remove. |