Back to Devexpress

AlertControl.AlertFormList Property

windowsforms-devexpress-dot-xtrabars-dot-alerter-dot-alertcontrol-1528e217.md

latest2.5 KB
Original Source

AlertControl.AlertFormList Property

Stores active classic alert forms (designed without HTML templates). Note that HTML alerts are not Forms, and are stored in the separate HtmlPopupList collection.

Namespace : DevExpress.XtraBars.Alerter

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public List<AlertForm> AlertFormList { get; }
vb
<Browsable(False)>
Public ReadOnly Property AlertFormList As List(Of AlertForm)

Property Value

TypeDescription
List<DevExpress.XtraBars.Alerter.AlertForm>

A list of active alert windows.

|

Remarks

This list changes at runtime when alert windows are opened and closed.

The following example demonstrates how to show and close alert windows:

csharp
using DevExpress.XtraBars.Alerter;

// Displays an alert window.
alertControl1.Show(this, "Alert", "The alert description.");

// Closes all active alert windows.
foreach(AlertForm alert in alertControl1.AlertFormList)
    alert.Close();

// Closes the specified alert window.
AlertForm alertWindow = alertControl1.AlertFormList[0];
if(alertWindow != null)
    alertWindow.Close();
vb
Imports DevExpress.XtraBars.Alerter

' Displays an alert window.
alertControl1.Show(Me, "Alert", "The alert description.")

' Closes all active alert windows.
For Each alert As AlertForm In alertControl1.AlertFormList
    alert.Close()
Next alert

' Closes the specified alert window.
Dim alertWindow As AlertForm = alertControl1.AlertFormList(0)
If alertWindow IsNot Nothing Then
    alertWindow.Close()
End If

See Also

AlertControl Class

AlertControl Members

DevExpress.XtraBars.Alerter Namespace