private void textBox_Validating( object sender, CancelEventArgs e )
{
int NewValue = 0;
if ( !int.TryParse( textBox.Text, out NewValue ) )
{ // Reset current value...
textBox.Text = Value.ToString();
e.Cancel = true;
return;
}
// Notify of the start of value change
if ( SliderDragStart != null )
SliderDragStart( this );
// Commit change
int StartValue = Value;
Value = NewValue;
// Notify of the stop of value change
if ( SliderDragStop != null )
SliderDragStop( this, StartValue );
}