DatePicker
DatePicker
, shown in Figure 14.10 for a Windows Store app, looks simplistic. It’s just three ComboBox
es stuck together for selecting a month, date, and year. But this is definitely a control you don’t want to implement yourself, as handling dates correctly for all cultures is tricky.
By default, DatePicker
shows the current date, but you can change it by setting its Date
property to a DateTimeOffset
. This is also the single property whose value changes whenever the user changes the month, day, or year. Such changes raise a DateChanged
event. You can turn
Get XAML Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.