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.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Property Value
Type | Description |
---|---|
Object | An |
Property Value
Type | Description |
---|---|
ImageOptions | An |
Property Paths
You can access this nested property as listed below:
Object Type | Path to ImageOptions |
---|---|
MessageOptions |
|
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. |