DatePicker.YearVisible Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether the year selector is shown.
public:
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
Boolean
bool
true if the year selector is shown; otherwise, false. The default is true.
Remarks
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.