/// <summary> /// Called when [allow text input changed]. /// </summary> /// <param name="o">The o.</param> /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void OnAllowTextInputChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { InputBase inputBase = o as InputBase; if (inputBase != null) { inputBase.OnAllowTextInputChanged(( bool )e.OldValue, ( bool )e.NewValue); } }
/// <summary> /// Delegate called when the text changed. /// </summary> /// <param name="pObject">The modified object.</param> /// <param name="pEventArgs">The event arguments.</param> private static void OnTextChanged(DependencyObject pObject, DependencyPropertyChangedEventArgs pEventArgs) { InputBase lControl = pObject as InputBase; if (lControl != null) { lControl.OnTextChanged((string)pEventArgs.OldValue, (string)pEventArgs.NewValue); } }
/// <summary> /// Called when [culture information changed]. /// </summary> /// <param name="o">The o.</param> /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void OnCultureInfoChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { InputBase inputBase = o as InputBase; if (inputBase != null) { inputBase.OnCultureInfoChanged(( CultureInfo )e.OldValue, ( CultureInfo )e.NewValue); } }
/// <summary> /// Delegate called when the watermark is coerced. /// </summary> /// <param name="pObject">The modified control.</param> /// <param name="pBaseValue">The value to coerce.</param> /// <returns>The coerced value.</returns> private static object OnCoerceWatermark(DependencyObject pObject, object pBaseValue) { InputBase lInputBase = pObject as InputBase; if (lInputBase != null) { return(lInputBase.OnCoerceWatermark((string)pBaseValue)); } return(pBaseValue); }
/// <summary> /// Coerces the text input. /// </summary> /// <param name="pObject">The modified object.</param> /// <param name="pBaseValue">The value to cerce.</param> /// <returns>The new value.</returns> private static object OnCoerceText(DependencyObject pObject, object pBaseValue) { InputBase lControl = pObject as InputBase; if (lControl != null) { return(lControl.CoerceText(pBaseValue as string)); } return(pBaseValue); }