Custom snapline in usercontrol

G

Guest

Anyone have any experience using custom snaplines?

I have a usercontrol that acts as a container for several child controls. I
wrote an inherited ControlDesigner to handle some custom actions for this
control, mainly to allow some resizing of the usercontrol's child controls
inside the designer. All works well so far. Now I want to add a custom
snapline that aligns to the edge of one of the internal controls. Done. If I
move two of these usercontrols around a form, they properly snap to each
other based on the child controls positioning. beuatiful.

Problem now is, when I do my internal control resizing (which also resizes
the usercontrol itself), I want to be able to hook to snaplines. For
instance, if I were to resize usercontrol A using the standard sizing grips,
A would snap to the same width as adjacent usercontrol B. However, if I
resize A using my custom methods, the snaplines do not work. Any ideas?

The internal resizing that's done is just done using mouse move/drag events.
Would this be something that I need to use custom behaviors pushed into the
BehaviorService stack for?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top