Skip to main content

EditorButton.IsDefaultButton Property

Gets or sets whether the button is the default button.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public virtual bool IsDefaultButton { get; set; }

Property Value

Type Description

true if the button is the default button; otherwise, false.


Default editor buttons are the buttons that are displayed by default. For instance, when a ButtonEdit is dropped onto a form, it displays a (…) button which is the default button. The button’s IsDefaultButton property specifies whether the button is the default button. This can be useful when creating custom editors with additional default buttons.


The example below demonstrates how to create a custom button editor with default spin buttons.

class RepositoryItemMyButtonEdit : RepositoryItemButtonEdit {
    // ...
    public static void RegisterMyButtonEdit() {
        // ...
        EditorRegistrationInfo.Default.Editors.Add(new EditorClassInfo("MyButtonEdit", 
        typeof(MyButtonEdit), typeof(RepositoryItemMyButtonEdit), 
        new DevExpress.XtraEditors.Drawing.ButtonEditPainter(), 
        true, null, typeof(DevExpress.Accessibility.ButtonEditAccessible)));
    private void AddDefaultButton(EditorButton btn, Keys keys) {
        btn.IsLeft = true;
        btn.Shortcut = new DevExpress.Utils.KeyShortcut(keys);
        btn.IsDefaultButton = true;
    public override void CreateDefaultButton() {
        AddDefaultButton(new EditorButton(ButtonPredefines.SpinRight), Keys.Add);
        AddDefaultButton(new EditorButton(ButtonPredefines.SpinLeft), Keys.Subtract);

public class MyButtonEdit : DevExpress.XtraEditors.ButtonEdit {
    static MyButtonEdit() {
    public override string EditorTypeName { get { return "MyButtonEdit"; } }
    // ...

The image below shows the result:


See Also