Back to Devexpress

EditorButton.Kind Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-editorbutton-f145a33f.md

latest9.0 KB
Original Source

EditorButton.Kind Property

Gets or sets the type of image to display within the button.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(ButtonPredefines.Ellipsis)]
[DXCategory("Appearance")]
public virtual ButtonPredefines Kind { get; set; }
vb
<DefaultValue(ButtonPredefines.Ellipsis)>
<DXCategory("Appearance")>
Public Overridable Property Kind As ButtonPredefines

Property Value

TypeDefaultDescription
ButtonPredefinesEllipsis

A ButtonPredefines enumerator value that specifies the type of image to display within the button.

|

Available values:

Show 22 items

NameDescription
Glyph

A custom bitmap is drawn on the button’s surface.

| | Down |

A Down-arrow is drawn on the button’s surface.

| | Up |

An Up-arrow is drawn on the button’s surface.

| | Left |

A Left-arrow symbol is drawn on the button’s surface.

| | Right |

A Right-arrow is drawn the button’s surface.

| | Ellipsis |

An Ellipsis symbol is drawn on the button’s surface.

| | Delete |

A Delete symbol is drawn on the button’s surface.

| | OK |

An OK sign is drawn on the button’s surface.

| | Plus |

A Plus sign is drawn on the button’s surface.

| | Minus |

A Minus sign is drawn on the button’s surface.

| | Redo |

A Redo symbol is drawn on the button’s surface.

| | Undo |

An Undo symbol is drawn on the button’s surface.

| | Combo |

A Down-arrow for a combo box is drawn on the button’s surface.

| | SpinUp |

An up-arrow for a spin editor is displayed on the button’s surface.

| | SpinDown |

A down-arrow for a spin editor is displayed on the button’s surface.

| | SpinLeft |

A left-arrow for a spin editor is displayed on the button’s surface.

| | SpinRight |

A right-arrow for a spin editor is displayed on the button’s surface.

| | Close |

A Close symbol is displayed on the button’s surface.

| | DropDown |

A Down-arrow is drawn on the button’s surface. Unlike, the Down button, this kind of button allows text to be displayed next to the down-arrow.

| | Search |

A Search symbol is drawn on the button’s surface.

| | Clear |

A Clear symbol is drawn on the button’s surface.

| | Separator |

A Separator.

|

Remarks

The Kind property allows you to specify the type of image to display within the button. The ButtonPredefines type enumerates possible image types. Setting the Kind property to Glyph allows you to display a custom image specified by the EditorButton.ImageOptions property. If Kind is set to a value other than Glyph , the button displays a predefined image. See the ButtonPredefines topic for sample screenshots.

If the Kind property is set to Glyph , Ellipsis , Delete , OK , Plus , Minus , Redo , Undo or DropDown , it is possible to display the button’s EditorButton.Caption near the image. To allow the display of the button’s caption and image at the same time, set the EditorButton.ImageOptions.Location property to any value except for MiddleCenter. Otherwise, only the image is displayed.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Kind 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-how-to-add-an-unbound-column-to-gridlisteditor-to-execute-a-custom-action-for-a-record/CS/EFCore/ButtonInListEF/ButtonInListEF.Win/Controllers/SimpleBusinessActionGridListViewController.cs#L83

csharp
EditorButton button = active ? inactivebutton : activebutton;
if(properties.Buttons[0].Kind != button.Kind) {
    properties.BeginInit();

winforms-tab-control-custom-header-buttons/CS/XtraTabControl_CustomButtons/Form1.cs#L22

csharp
void xtraTabControl1_CustomHeaderButtonClick(object sender, CustomHeaderButtonEventArgs e) {
    if (e.Button.Kind == ButtonPredefines.Plus)
        OnAddImageBtnClick();

winforms-lookup-add-empty-item/CS/Form1.cs#L31

csharp
private void repositoryItemLookUpEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) {
    if(e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Delete) {
        LookUpEdit editor = (LookUpEdit)sender;

winforms-tab-control-custom-header-buttons/VB/XtraTabControl_CustomButtons/Form1.vb#L25

vb
Private Sub xtraTabControl1_CustomHeaderButtonClick(ByVal sender As Object, ByVal e As CustomHeaderButtonEventArgs)
    If e.Button.Kind = ButtonPredefines.Plus Then OnAddImageBtnClick()
    If e.Button.Kind = ButtonPredefines.Minus Then OnRemoveImageClick()

winforms-lookup-add-empty-item/VB/Form1.vb#L28

vb
Private Sub repositoryItemLookUpEdit1_ButtonClick(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs)
    If e.Button.Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Delete Then
        Dim editor As LookUpEdit = CType(sender, LookUpEdit)

See Also

Caption

ImageOptions

EditorButton Class

EditorButton Members

DevExpress.XtraEditors.Controls Namespace