ListBoxEditStyleSettings.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.v24.1.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
String | The empty item text. |
Remarks
The ListBoxEdit 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 list box editor.
The code sample below demonstrates how to enable the empty item and change its default text.
<dxe:ListBoxEdit>
<dxe:ListBoxEdit.StyleSettings>
<dxe:ListBoxEditStyleSettings ShowEmptyItem="True" EmptyItemText="(Null)"/>
</dxe:ListBoxEdit.StyleSettings>
<dxe:ListBoxEditItem Content="Item 1"/>
<dxe:ListBoxEditItem Content="Item 2"/>
<dxe:ListBoxEditItem Content="Item 3"/>
</dxe:ListBoxEdit>
See Also