Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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