Browse Source

DateTimePicker: if the Calendar is open and has focus the Up/Down keys would not navigate the calendar as expected. This has been fixed.

import/raw
brianlagunas_cp 15 years ago
parent
commit
3911d3bf6b
  1. 11
      Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

11
Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

@ -83,8 +83,8 @@ namespace Microsoft.Windows.Controls
protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
{
if (Mouse.Captured is CalendarItem)
Mouse.Capture(null);
if (Mouse.Captured is CalendarItem)
Mouse.Capture(null);
}
protected override void OnValueChanged(DateTime? oldValue, DateTime? newValue)
@ -98,6 +98,13 @@ namespace Microsoft.Windows.Controls
base.OnValueChanged(oldValue, newValue);
}
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
//if the calendar is open then we don't want to modify the behavior of navigating the calendar control with the Up/Down keys.
if (!IsOpen)
base.OnPreviewKeyDown(e);
}
#endregion //Base Class Overrides
#region Event Handlers

Loading…
Cancel
Save