Ok this one should be a challenge.
I have a control with a custom designer. The control is basically a Poly-Line object which draws multiple lines at different angles chosen by the user at design time.
In design time when the user selects the control I place a Glyph at each of the points where the line changes direction. to get the idea, the character below would be two lines with a glyph at 3 points. One at each line end and one at the intersection.
>
The purpose of the glyphs is to give the user the ability to re-shape the poly line object. They will basically drag one of the glyphs to another position in the designer, and that will be the new position of the associated point, and the control will re-draw itself.
I've got this working sort of, but I'm not happy with how it is working. There is a lot of flicker.
What I have done is in the behavior service of the glyph I have over-ridden the mouse down, mouse up and mouse move handlers. When I press the mouse down, I keep track of the point, then if the mouse moves and the button is still down, I move the glyph with the mouse and invalidate the adorner (flicker)
Tthen when the mouse button goes up I fire an event (that I created in my glyph) that says the gliph has changed its location, then I redraw the control.
And the QUESTION is: Is there a better method of doing this?