/// <summary>
 /// Raises ScrollBarValueChanged event.
 /// </summary>
 /// <param name="e">Provides event arguments.</param>
 protected virtual void OnScrollBarValueChanged(ScrollValueChangedEventArgs e)
 {
     ScrollValueChangedHandler handler = ScrollBarValueChanged;
     if (handler != null)
         handler(this, e);
 }
 private void ControlScrollBarValueChanged(object sender, ScrollValueChangedEventArgs e)
 {
     if ((e.ScrollChange & eScrollBarScrollChange.Vertical) == eScrollBarScrollChange.Vertical)
     {
         UpdateVerticalScrollBarValues();
     }
     if ((e.ScrollChange & eScrollBarScrollChange.MouseWheel) == eScrollBarScrollChange.MouseWheel)
     {
         UpdateVerticalScrollBarValues();
         InvokeDelayed(new MethodInvoker(delegate { UpdateVerticalScrollBarValues(); }), ScrollPositionUpdateDelay);
     }
     if ((e.ScrollChange & eScrollBarScrollChange.Horizontal) == eScrollBarScrollChange.Horizontal)
     {
         UpdateHorizontalScrollBarValues();
     }
     UpdateScrollBars();
 }