BSA – WPF Line Moving

The diagram above show an actual PolyLine on a diagram – or more correctly two lines. Drawing shapes you get automatic hit test support as the mouse moves over the line, so only a few commands was needed to implement a Line Move feature. The chellenge was more that a line with thickness 1 was hard to hit, so I cheat and put an invisible line with thickness=10 above. This works perfect and it was straight up moving on scrolling and zooming. I still need to add joint markers so the user can do more than move, but this one amazed me of how easy it was. I do pay the prize of drawing secret lines, but the advantage is that I can set color and transparancy=50 (as above) then mouse hit – it is actually very cool.

Categories: HMI

Leave a Reply