Skip to main content

DateEdit.ShowClearButton Property

Gets or sets whether the dropdown calendar displays the Clear button. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public bool ShowClearButton { get; set; }

Property Value

Type Description
Boolean

true if the dropdown calendar displays the Clear button; otherwise, false.

Remarks

The Clear button allows end-users to clear the selected date. Click the button to set the editor’s BaseEdit.EditValue property to BaseEdit.NullValue and close the drop-down calendar.

You can display the Clear button only when one of the following operation modes is active:

The following code sample displays the Clear button:

<Window ...
  xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
  <Grid>
    <dxe:DateEdit ShowClearButton="True">
      <dxe:DateEdit.StyleSettings>
        <dxe:DateEditCalendarStyleSettings/>
      </dxe:DateEdit.StyleSettings>
    </dxe:DateEdit>
  </Grid>
</Window>
See Also