Beispiel #1
0
 /// <summary>
 /// Initializing constructor
 /// </summary>
 /// <param name="leftDelta">Difference in X location of a window since the time the last
 /// event has fired.</param>
 /// <param name="widthDelta">Difference in width of a window since the time the last
 /// event has fired.</param>
 /// <param name="heightDelta">Difference in height of a window since the time the last
 /// event has fired.</param>
 /// <param name="thumbId">Identifies which portion of the resize bar is being dragged</param>
 public ResizeBarEventArgs(double leftDelta, double widthDelta, double heightDelta, ThumbId thumbId)
 {
     _leftDelta   = leftDelta;
     _widthDelta  = widthDelta;
     _heightDelta = heightDelta;
     _thumbId     = thumbId;
 }
Beispiel #2
0
 /// <summary>
 /// Initializing constructor
 /// </summary>
 /// <param name="leftDelta">Difference in X location of a window since the time the last
 /// event has fired.</param>
 /// <param name="widthDelta">Difference in width of a window since the time the last
 /// event has fired.</param>
 /// <param name="heightDelta">Difference in height of a window since the time the last
 /// event has fired.</param>
 /// <param name="thumbId">Identifies which portion of the resize bar is being dragged</param>
 public ResizeBarEventArgs( double leftDelta, double widthDelta, double heightDelta, ThumbId thumbId )
 {
     _leftDelta = leftDelta;
     _widthDelta = widthDelta;
     _heightDelta = heightDelta;
     _thumbId = thumbId;
 }
Beispiel #3
0
        private void OnDragDelta( object sender, DragDeltaEventArgs e )
        {
            if( sender != _currentSender )
            {
                if( sender == _thumbControls[ (int)ThumbId.Center ] )
                {
                    _currentThumb = ThumbId.Center;
                    _leftMultiplier = 0.0;
                    _widthMultplier = 0.0;
                    _heightMultplier = 1.0;
                }
                else if( sender == _thumbControls[ (int)ThumbId.Left ] )
                {
                    _currentThumb = ThumbId.Left;
                    _leftMultiplier = 1.0;
                    _widthMultplier = -1.0;
                    _heightMultplier = 1.0;
                }
                else if( sender == _thumbControls[ (int)ThumbId.Right ] )
                {
                    _currentThumb = ThumbId.Right;
                    _leftMultiplier = 0.0;
                    _widthMultplier = 1.0;
                    _heightMultplier = 1.0;
                }
                else
                {
                    return;
                }
            }

            OnResize( e.HorizontalChange * _leftMultiplier,
                      e.HorizontalChange * _widthMultplier,
                      e.VerticalChange   * _heightMultplier );
        }