private void OnInputValidationError( object sender, InputValidationErrorEventArgs e )
 {
   if( this.Child != null )
   {
     CellEditor.SetHasError( ( DependencyObject )this.Child, true );
   }
 }
        private void Decimal_InputValidationError(object sender, InputValidationErrorEventArgs e)
        {
            DecimalUpDown dSender = (DecimalUpDown)sender;

              string value = dSender.Text;
              value = value.Replace(',', '.');

              decimal parseValue;
              if(decimal.TryParse(value, System.Globalization.NumberStyles.Float, new CultureInfo("en-US"), out parseValue))
              {
            if(parseValue > dSender.Maximum)
            {
              dSender.Value = dSender.Maximum;
            }
            else if(parseValue < dSender.Minimum)
            {
              dSender.Value = dSender.Minimum;
            }
            else
            {
              dSender.Value = parseValue;
            }
              }
        }