I have the following DatePicker
control in my project:
<DatePicker x:Name="startDate" SelectedDate="2013-04-03"></DatePicker>
QUESTION:
Is it possible to set the DatePicker.SelectedDate
using only XAML?
I know this can be achieved using code-behind.
Try this...
Add this to xaml refs:
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Then write this:
<DatePicker SelectedDate="{x:Static sys:DateTime.Now}"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With