Back to Devexpress

ActionBase.PaintStyle Property

expressappframework-devexpress-dot-expressapp-dot-actions-dot-actionbase-b218d90e.md

latest5.5 KB
Original Source

ActionBase.PaintStyle Property

Specifies the Action‘s paint style.

Namespace : DevExpress.ExpressApp.Actions

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[DefaultValue(ActionItemPaintStyle.Default)]
public ActionItemPaintStyle PaintStyle { get; set; }
vb
<DefaultValue(ActionItemPaintStyle.Default)>
Public Property PaintStyle As ActionItemPaintStyle

Property Value

TypeDefaultDescription
ActionItemPaintStyleDefault

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

|

Available values:

NameDescriptionImage
Default

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

| | | Caption |

An Action is displayed in the UI as a caption.

|

| | CaptionAndImage |

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

|

| | Image |

An Action is displayed in the UI as an image.

|

|

Remarks

Use one of the following approaches to specify this property:

  • In code

  • 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 code snippets (auto-collected from DevExpress Examples) contain references to the PaintStyle property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-save-and-share-custom-view-settings/CS/EFCore/ViewSettingsEF/ViewSettingsEF.Module/Controllers/ViewVariantsController.cs#L165

csharp
this.SelectViewVariantAction = new SingleChoiceAction(this, "SelectViewVariant", "Edit");
this.SelectViewVariantAction.PaintStyle = ActionItemPaintStyle.Caption;
this.SelectViewVariantAction.Execute += new SingleChoiceActionExecuteEventHandler(this.SelectViewVariantAction_Execute);

XAF_logon-form-manage-users-register-a-new-user-restore-a-password/CS/EFCore/Security.Extensions/ManageUsersOnLogonController.cs#L55

csharp
action.ImageName = imageName;
action.PaintStyle = ActionItemPaintStyle.Image;
action.ToolTip = toolTip;

xaf-how-to-import-data-in-xaf/CS/WinWebSolution.Module/ImportDataListViewController.cs#L37

csharp
importDataAction.Items.Add(item2);
importDataAction.PaintStyle = ActionItemPaintStyle.CaptionAndImage;
importDataAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;

xaf-how-to-import-data-in-xaf/VB/WinWebSolution.Module/ImportDataListViewController.vb#L40

vb
importDataAction_Renamed.Items.Add(item2)
importDataAction_Renamed.PaintStyle = ActionItemPaintStyle.CaptionAndImage
importDataAction_Renamed.ItemType = SingleChoiceActionItemType.ItemIsOperation

See Also

ActionBase Class

ActionBase Members

DevExpress.ExpressApp.Actions Namespace