Browse Source

DateTimeUpDown: fixed bug that occurs when you hit the enter button.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
eaaffa09bb
  1. 11
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs

11
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Windows;
using System.Windows.Input;
namespace Microsoft.Windows.Controls
{
@ -70,7 +71,15 @@ namespace Microsoft.Windows.Controls
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
TextBox.SelectionChanged += new RoutedEventHandler(TextBox_SelectionChanged);
TextBox.SelectionChanged += TextBox_SelectionChanged;
}
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
if (e.Key == Key.Enter)
return;
base.OnPreviewKeyDown(e);
}
#endregion //Base Class Overrides

Loading…
Cancel
Save