Skip to main content

ComboBoxStyleSettings.EmptyItemText Property

Gets or sets the text displayed within the empty item. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

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

NuGet Package: DevExpress.Wpf.Core

Declaration

public string EmptyItemText { get; set; }

Property Value

Type Description
String

The empty item text.

Remarks

The ComboBoxEdit control can display the empty item above its other items. When an end-user selects the empty item, the control’s EditValue is set to null.

The EmptyItemText property allows you to change the default empty item‘s text. Use the ShowEmptyItem property to control the availability of the empty item in the combo box dropdown list.

The code sample below demonstrates how to enable the empty item and change its default text.

<dxe:ComboBoxEdit>
    <dxe:ComboBoxEdit.StyleSettings>
        <dxe:ComboBoxStyleSettings ShowEmptyItem="True" EmptyItemText="(Null)"/>
    </dxe:ComboBoxEdit.StyleSettings>
    <dxe:ComboBoxEditItem Content="Item1"/>
    <dxe:ComboBoxEditItem Content="Item2"/>
    <dxe:ComboBoxEditItem Content="Item3"/>
</dxe:ComboBoxEdit>
See Also