DatePicker.YearVisible Property


Gets or sets a value that indicates whether the year selector is shown.

 property bool YearVisible { bool get(); void set(bool value); };
bool YearVisible();

void YearVisible(bool value);
public bool YearVisible { get; set; }
var boolean = datePicker.yearVisible;
datePicker.yearVisible = boolean;
Public Property YearVisible As Boolean
<DatePicker YearVisible="bool"/>

Property Value



true if the year selector is shown; otherwise, false. The default is true.


By default, the DatePicker shows ComboBox elements to select the month, day, and year. Set YearVisible to false to hide the ComboBox that displays or changes the year component of a date.

Here's the picker with the year field hidden.

A date picker with the year field hidden.

Applies to

See also