Browse Source

DateTimePicker: minor fix with Calendar not releasing the mouse capture.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
35907b1ecc
  1. 16
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

16
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

@ -1,16 +1,8 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Controls.Primitives;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Microsoft.Windows.Controls namespace Microsoft.Windows.Controls
{ {
@ -149,6 +141,12 @@ namespace Microsoft.Windows.Controls
_calendar.SelectedDate = SelectedDate; _calendar.SelectedDate = SelectedDate;
} }
protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
{
if (Mouse.Captured is CalendarItem)
Mouse.Capture(null);
}
#endregion //Base Class Overrides #endregion //Base Class Overrides
#region Event Handlers #region Event Handlers

Loading…
Cancel
Save