Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AlertControl.HtmlTemplates Property

Gets the collection of HTML-CSS templates.

Namespace: DevExpress.XtraBars.Alerter

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Layout")]
public HtmlTemplateCollection HtmlTemplates { get; }

#Property Value

Type Description
HtmlTemplateCollection

The collection of HTML-CSS templates.

#Remarks

AlertControl can render alert windows from HTML-CSS templates. Use the AlertControl.HtmlTemplate property to specify the default template.

The HtmlTemplates collection allows you to create multiple templates beforehand. You can handle the AlertControl.BeforeFormShow event to assign templates from this collection to alert windows dynamically.

private void alertControl1_BeforeFormShow(object sender, DevExpress.XtraBars.Alerter.AlertFormEventArgs e) {
    AlertControl alertControl = sender as AlertControl;
    if (e.HtmlPopup.AlertInfo.Tag != null)
        e.HtmlPopup.HtmlTemplate.Assign(alertControl.HtmlTemplates[1]);
}

See the following topic for more information: Alert Windows with HTML Templates.

See Also