Created
November 21, 2012 01:12
-
-
Save sandorfr/4122421 to your computer and use it in GitHub Desktop.
About WinRT projection : the DateTime case (http://www.sandor.fr/en/2012/11/21/a-propos-de-la-projection-winrt-le-cas-datetime)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DateTimeOffset? SelectedDate | |
{ | |
get { return (DateTimeOffset?)GetValue(SelectedDateProperty); } | |
set { SetValue(SelectedDateProperty, value); } | |
} | |
public static readonly DependencyProperty SelectedDateProperty = | |
DependencyProperty.Register("SelectedDate", typeof(DateTimeOffset?), typeof(DataTimePicker), new PropertyMetadata(null, OnSelectedDateChanged)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public object SelectedDate | |
{ | |
get { return (DateTime?)GetValue(SelectedDateProperty); } | |
set { SetValue(SelectedDateProperty, value); } | |
} | |
public static readonly DependencyProperty SelectedDateProperty = | |
DependencyProperty.Register("SelectedDate", typeof(object), typeof(DataTimePicker), new PropertyMetadata(null, OnSelectedDateChanged)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DateTime? SelectedDate | |
{ | |
get { return (DateTime?)GetValue(SelectedDateProperty); } | |
set { SetValue(SelectedDateProperty, value); } | |
} | |
public static readonly DependencyProperty SelectedDateProperty = | |
DependencyProperty.Register("SelectedDate", typeof(DateTime?), typeof(DataTimePicker), new PropertyMetadata(null, OnSelectedDateChanged)); | |
private static void OnSelectedDateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<local:DataTimePicker SelectedDate="{Binding CurrentDate}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment