Change link curviness with mouse move

The sample StateChart changes the selected link curviness with an Up-Down control. I would like to highlight a link and let the link curviness changes with the mouse movement How to do this?

I assume you already know that the user can reshape the links by dragging the resize handles.

I suppose you could override AddSelectionHandles and DoResize to implement this additional behavior. You’ll want to define and add an additional resize handle representing the curviness value. DoResize would recognize when the user is dragging that new resize handle, and change the curviness value correspondingly. If you remember your trigonometry and analytic geometry, this will be easy to do.

Look for overrides of AddSelectionHandles and DoResize in the samples, such as OctagonalStar in Demo1.