diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs
index 58c656be..d802c662 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs
@@ -6,20 +6,8 @@ namespace Microsoft.Windows.Controls.Primitives
{
public abstract class InputBase : Control
{
- #region Members
-
- ///
- /// Flags if the Text and Value properties are in the process of being sync'd
- ///
- private bool _isSyncingTextAndValueProperties;
- private bool _isInitialized;
-
- #endregion //Members
-
#region Properties
- public virtual object PreviousValue { get; internal set; }
-
#region IsEditable
public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register("IsEditable", typeof(bool), typeof(InputBase), new PropertyMetadata(true));
@@ -33,19 +21,17 @@ namespace Microsoft.Windows.Controls.Primitives
#region Text
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(InputBase), new FrameworkPropertyMetadata(default(String), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged));
+ public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(InputBase), new PropertyMetadata(default(String), OnTextPropertyChanged));
public string Text
{
- get { return (string)this.GetValue(TextProperty); }
- set { this.SetValue(TextProperty, value); }
+ get { return (string)GetValue(TextProperty); }
+ set { SetValue(TextProperty, value); }
}
private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
InputBase input = (InputBase)d;
input.OnTextChanged((string)e.OldValue, (string)e.NewValue);
- if (input._isInitialized)
- input.SyncTextAndValueProperties(e.Property, e.NewValue);
}
protected virtual void OnTextChanged(string previousValue, string currentValue)
@@ -55,132 +41,6 @@ namespace Microsoft.Windows.Controls.Primitives
#endregion //Text
- #region Value
-
- public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(object), typeof(InputBase), new FrameworkPropertyMetadata(default(object), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValuePropertyChanged, OnCoerceValuePropertyCallback));
- public virtual object Value
- {
- get { return (object)GetValue(ValueProperty); }
- set { SetValue(ValueProperty, value); }
- }
-
- private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- InputBase input = (InputBase)d;
-
- if (e.OldValue != e.NewValue)
- {
- input.PreviousValue = e.OldValue;
- input.OnValueChanged(e.OldValue, e.NewValue);
-
- if (input._isInitialized)
- input.SyncTextAndValueProperties(e.Property, e.NewValue);
- }
- }
-
- protected virtual void OnValueChanged(object oldValue, object newValue)
- {
- RoutedPropertyChangedEventArgs