Back to Devexpress

ButtonEdit.AllowDefaultButton Property

wpf-devexpress-dot-xpf-dot-editors-dot-buttonedit.md

latest3.9 KB
Original Source

ButtonEdit.AllowDefaultButton Property

Gets or sets whether the editor’s default button is displayed. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public bool? AllowDefaultButton { get; set; }
vb
Public Property AllowDefaultButton As Boolean?

Property Value

TypeDescription
Nullable<Boolean>

true to display the editor’s default button; otherwise, false.

|

Remarks

Use the AllowDefaultButton property to control whether the default button that relates to an editor’s functionality (such as the dropdown button of a combo box editor) is displayed within the editor. When the editor’s default button is clicked, the ButtonEdit.DefaultButtonClick event is raised.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowDefaultButton 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.

wpf-synchronous-theme-preload-with-splashscreen/CS/ThemePreloadwithSplashscreen/ComplexWindow.xaml#L112

xml
<dxe:ButtonEdit
    AllowDefaultButton="False"
    EditValue="{Binding Path=HomePhone, Mode=TwoWay}"

wpf-create-a-fluent-design-using-appearance-options/CS/FluentDesignTemplate/MainWindow.xaml#L43

xml
</dx:WpfSvgPalette.Palette>
<dxe:ButtonEdit Background="#1FFFFFFF" Margin="0,0,30,0" Width="230" NullText="Search everywhere..." BorderThickness="0" BorderBrush="Transparent" AllowDefaultButton="False">
    <dxe:ButtonInfo IsLeft="True" GlyphKind="Custom">

wpf-property-grid-use-data-annotations-to-define-property-editor/CS/PropertyGridEditorAttribute/MainWindow.xaml#L40

xml
IsTextEditable="False"
            AllowDefaultButton="False">
<dxe:ButtonEdit.Buttons>

mvvm-application-with-wpf-bars/CS/Bars_in_MVVM_Application/MainWindow.xaml#L80

xml
<dxe:ComboBoxEdit ShowBorder="False" IsReadOnly="True" IsTextEditable="False" Margin="2,0"
                  AllowDefaultButton="False" EditValue="{Binding Tags}"
                  PopupOpening="{DXEvent Handler='@args.Cancel = true;'}"

See Also

DefaultButtonClick

ButtonEdit Class

ButtonEdit Members

DevExpress.Xpf.Editors Namespace