Skip to main content

DisplayDate Property

Gets or sets the date to display.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public DateTime DisplayDate { get; set; }

Property Value

DateTime
The date to display.

Remarks

This property allows the developer to specify a date to display. If this property is a null reference (Nothing in Visual Basic), SelectedDate is displayed. If SelectedDate is also a null reference (Nothing in Visual Basic), Today is displayed. The default is Today.

To set this property in XAML, use a date specified in the format yyyy/mm/dd. The mm and dd components must always consist of two characters, with a leading zero if necessary. For instance, the month of May should be specified as 05.

Exceptions

ArgumentOutOfRangeExceptionThe given date is not in the range specified by DisplayDateStart and DisplayDateEnd.

See Also

Reference

Calendar Class
Avalonia.Controls Namespace