Skip to content

Instantly share code, notes, and snippets.

@sandorfr
Created November 21, 2012 01:12
Show Gist options
  • Save sandorfr/4122421 to your computer and use it in GitHub Desktop.
Save sandorfr/4122421 to your computer and use it in GitHub Desktop.
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));
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));
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)
{
}
<local:DataTimePicker SelectedDate="{Binding CurrentDate}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment