Tinkr2/4.2/AphelionCore/AphelionCore/Controls/ScrollableControl.cs
/// <summary>
/// Override this message to handle touch events internally.
/// </summary>
/// <param name="sender">Object sending the event</param>
/// <param name="point">Point on screen touch event is occurring</param>
/// <param name="handled">true if the event is handled. Set to true if handled.</param>
Override this message to handle touch events internally.
Override this message to handle touch events internally .
protected override void TouchMoveMessage(object sender, point point, ref bool handled)
      {
         if (_needsX || _needsY)
         {
            bool doInvalidate = false;
            _bMoving = true;
            _cancelHide = true;
            _showScroll = true;
            int dest = _scrY - (point.Y - LastTouch.Y);
            if (dest < 0)
            {
               dest = 0;
            }
            else if (dest > MaxScrollY - Height)
            {
               dest = MaxScrollY - Height;
            }
            if (_scrY != dest && dest > 0)
            {
               _scrY = dest;
               doInvalidate = true;
            }
            dest = _scrX - (point.X - LastTouch.X);
            if (dest < 0)
            {
               dest = 0;
            }
            else if (dest > MaxScrollX - Width)
            {
               dest = MaxScrollX - Width;
            }
            if (_scrX != dest && dest > 0)
            {
               _scrX = dest;
               doInvalidate = true;
            }
            LastTouch = point;
            if (doInvalidate)
            {
               UpdateValues();
            }
         }
         base.TouchMoveMessage(sender, point, ref handled);
      }
protected override void TouchMoveMessage ( object sender , point point , ref bool handled ) { if ( _needsX || _needsY ) { bool doInvalidate = false ; _bMoving = true ; _cancelHide = true ; _showScroll = true ; int dest = _scrY - ( point . Y - LastTouch . Y ) ; if ( dest < 0 ) { dest = 0 ; } else if ( dest > MaxScrollY - Height ) { dest = MaxScrollY - Height ; } if ( _scrY != dest && dest > 0 ) { _scrY = dest ; doInvalidate = true ; } dest = _scrX - ( point . X - LastTouch . X ) ; if ( dest < 0 ) { dest = 0 ; } else if ( dest > MaxScrollX - Width ) { dest = MaxScrollX - Width ; } if ( _scrX != dest && dest > 0 ) { _scrX = dest ; doInvalidate = true ; } LastTouch = point ; if ( doInvalidate ) { UpdateValues ( ) ; } } base . TouchMoveMessage ( sender , point , ref handled ) ; }
Override this message to handle touch events internally.
Override this message to handle touch events internally .
// Handle Scrolling
sender
object
Object sending the event
Object sending the event
point
point
Point on screen touch event is occurring
Point on screen touch event is occurring
bool
ref
<not_specific>
handled
<not_specific>
true if the event is handled. Set to true if handled.
true if the event is handled . Set to true if handled .