Skip to main content
.NET 8.0+

WinMessageOptions.ImageOptions Property

Provides access to the DevExpress.Utils.ImageOptions object. This object contains image settings of a notification that the ToastNotification or AlertControl displays in a WinForms application.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public object ImageOptions { get; set; }
public ImageOptions ImageOptions { get; }

Property Value

Type Description
Object

An ImageOptions object that contains image settings of a notification the ToastNotification or AlertControl displays in a WinForms application.

Property Value

Type Description
ImageOptions

An ImageOptions object that contains image settings of a notification the ToastNotification or AlertControl displays in a WinForms application.

Property Paths

You can access this nested property as listed below:

Object Type Path to ImageOptions
MessageOptions
.Win .ImageOptions

Remarks

The following code shows how to change and customize a notification’s image:

using System.Drawing;
using DevExpress.ExpressApp;
using DevExpress.Utils.Svg;
//...
    MessageOptions options = new MessageOptions();
    //options.Win.ImageOptions.Image = Image.FromFile(@"D:\Images\success.png");
    // or
    options.Win.ImageOptions.SvgImage = SvgImage.FromFile(@"D:\Images\Success.svg");
    options.Win.ImageOptions.SvgImageSize = new Size(50, 50);
    Application.ShowViewStrategy.ShowMessage(options);

You can use the following DevExpress.Utils.ImageOptions‘ properties:

Property

Description

Image

Specifies a raster image for a notification.

SvgImage

Specifies an SVG image for a notification.

SvgImageSize

Specifies the size of an SVG image specified in the SvgImage property.

See Also