private static ScrollingDirection GetScrollingDirection(RadDiagram diagram, Point currentPosition)
        {
            var diagramPosition = diagram.GetTransformedPoint(currentPosition);

            if (diagramPosition.Y <= diagram.Viewport.Top)
            {
                return(ScrollingDirection.Up);
            }
            else if (diagramPosition.Y >= diagram.Viewport.Bottom)
            {
                return(ScrollingDirection.Down);
            }
            else if (diagramPosition.X <= diagram.Viewport.Left)
            {
                return(ScrollingDirection.Left);
            }
            else if (diagramPosition.X >= diagram.Viewport.Right)
            {
                return(ScrollingDirection.Right);
            }
            else
            {
                return(ScrollingDirection.None);
            }
        }
        private static ScrollingDirection GetScrollingDirection(RadDiagram diagram, Point currentPosition)
        {
            var diagramPosition = diagram.GetTransformedPoint(currentPosition);

            if (diagramPosition.Y <= diagram.Viewport.Top)
            {
                return ScrollingDirection.Up;
            }
            else if (diagramPosition.Y >= diagram.Viewport.Bottom)
            {
                return ScrollingDirection.Down;
            }
            else if (diagramPosition.X <= diagram.Viewport.Left)
            {
                return ScrollingDirection.Left;
            }
            else if (diagramPosition.X >= diagram.Viewport.Right)
            {
                return ScrollingDirection.Right;
            }
            else
            {
                return ScrollingDirection.None;
            }
        }