Skip to main content
All docs
V23.2

RibbonMessageArgs.Icon Property

Gets or sets the message icon.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public MessageBoxIcon Icon { get; set; }

Property Value

Type Description
MessageBoxIcon

A MessageBoxIcon enumeration value that specifies which icon to display in the message.

Remarks

Use the Icon property to display a standard MessageBox-related icon. Use the ImageOptions property to display a custom raster image or SVG icon in the message.

Note

The ImageOptions property takes priority over the Icon property (if both properties are set).

Read the following topic for information: Ribbon Message.

Example

using DevExpress.XtraBars.Ribbon;

void ShowMessage() {
    RibbonMessageArgs args = new RibbonMessageArgs();
    args.Caption = "What's New";
    args.Text = "Explore our new WinForms-related features we expect to introduce in our first major update this year (v23.1).";
    args.Icon = MessageBoxIcon.Information;
    args.Buttons = new DialogResult[] { DialogResult.OK };
    args.Showing += Args_Showing;
    Ribbon.ShowMessage(args);
    Ribbon.MessageClosed += Ribbon_MessageClosed;
}
void Ribbon_MessageClosed(object sender, RibbonMessageClosedArgs e) {
    if(e.Result == DialogResult.OK)
        DevExpress.Data.Utils.SafeProcess.Start("https://community.devexpress.com/blogs/winforms/archive/2023/02/16/devexpress-winforms-roadmap-23-1.aspx");
}
void Args_Showing(object sender, RibbonMessageShowingArgs e) {
    e.Buttons[DialogResult.OK].Caption = "Explore Roadmap";
}

The following image shows the result:

Ribbon Style - Office 365

See Also