Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

WinMessageOptions.ImageOptions Property

Provides access toSpecifies 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.v20.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
DevExpress.Utils.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);

Create a DevExpress.Utils.ImageOptions object to change and customize a notification’s image as shown below:

using System.Drawing;
using DevExpress.ExpressApp;
using DevExpress.Utils;
using DevExpress.Utils.Svg;
//...
MessageOptions options = new MessageOptions();
ImageOptions imageOptions = new ImageOptions();
//imageOptions.Image = Image.FromFile(@"D:\Images\success.png");
// or
imageOptions.SvgImage = SvgImage.FromFile(@"D:\Images\success.svg");
imageOptions.SvgImageSize = new Size(50, 50);
options.Win.ImageOptions = imageOptions;
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