O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DatePicker

DatePicker, shown in Figure 14.10 for a Windows Store app, looks simplistic. It’s just three ComboBoxes 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.

Image

FIGURE 14.10 The modest-looking DatePicker control packs a lot of power.

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required