Skip to main content
.NET 8.0+

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

ActionBase.PaintStyle Property

Specifies the Action‘s paint style.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

[DefaultValue(ActionItemPaintStyle.Default)]
public ActionItemPaintStyle PaintStyle { get; set; }

#Property Value

Type Default Description
ActionItemPaintStyle Default

An ActionItemPaintStyle enumeration value that specifies the Action’s paint style.

Available values:

Name Description Image
Default

The default value is Image for WinForms and ASP.NET Web Forms applications, and CaptionAndImage for ASP.NET Core Blazor applications.

Caption

An Action is displayed in the UI as a caption.

ActionBasePaintStyleCaption

CaptionAndImage

An Action is displayed in the UI as an image and a caption.

ActionBasePaintStyleCaptionImage

Image

An Action is displayed in the UI as an image.

ActionBasePaintStyleImage

#Remarks

Use one of the following approaches to specify this property:

  • In code

    using DevExpress.ExpressApp;
    using DevExpress.ExpressApp.Actions;
    using DevExpress.ExpressApp.Templates;
    using DevExpress.Persistent.Base;
    // ...
    public class MyController : ObjectViewController<ListView, Contact> {
        public MyController() {
            SimpleAction customAction = new SimpleAction(this, "CustomAction", PredefinedCategory.View) {
                Caption = "Custom Action",
                ImageName = "ModelEditor_Application"
            };
            customAction.SelectionDependencyType = SelectionDependencyType.RequireSingleObject;
            customAction.PaintStyle = ActionItemPaintStyle.Caption;
        }
    }
    
  • In the Model Editor
    Navigate to an ActionDesign | Actions | <Action> node and specify the IModelAction.PaintStyle property.

Note that the value specified in the Model Editor has a higher priority than the value specified in code. For more information, refer to the following topic: Application Model Basics.

The following table shows the available paint styles:

Enumeration Value

Illustration

Caption

ActionBasePaintStyleCaption

CaptionAndImage

ActionBasePaintStyleCaptionImage

Image

ActionBasePaintStyleImage

Default

in WinForms applications: Image
in ASP.NET Web Forms applications: Image
in ASP.NET Core Blazor applications: CaptionAndImage

Note

WinForms applications with the Ribbon FormStyle ignore this property. In these applications, Actions always show both image and caption.

See Also