|
|
|
@ -160,6 +160,10 @@ namespace Microsoft.Windows.Controls |
|
|
|
_calendar.SelectedDate = newValue; |
|
|
|
_calendar.DisplayDate = newValue.Value; |
|
|
|
} |
|
|
|
|
|
|
|
RoutedPropertyChangedEventArgs<object> args = new RoutedPropertyChangedEventArgs<object>(oldValue, newValue); |
|
|
|
args.RoutedEvent = ValueChangedEvent; |
|
|
|
RaiseEvent(args); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion //Value
|
|
|
|
@ -253,6 +257,18 @@ namespace Microsoft.Windows.Controls |
|
|
|
|
|
|
|
#endregion //Event Handlers
|
|
|
|
|
|
|
|
#region Events
|
|
|
|
|
|
|
|
//Due to a bug in Visual Studio, you cannot create event handlers for Nullable<T> args in XAML, so I have to use object instead.
|
|
|
|
public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler<object>), typeof(DateTimePicker)); |
|
|
|
public event RoutedPropertyChangedEventHandler<object> ValueChanged |
|
|
|
{ |
|
|
|
add { AddHandler(ValueChangedEvent, value); } |
|
|
|
remove { RemoveHandler(ValueChangedEvent, value); } |
|
|
|
} |
|
|
|
|
|
|
|
#endregion //Events
|
|
|
|
|
|
|
|
#region Methods
|
|
|
|
|
|
|
|
private void CloseDateTimePicker() |
|
|
|
|