468,136 Members | 1,432 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

Custom snapline in usercontrol

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?
Sep 27 '06 #1
0 2363

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Dag | last post: by
2 posts views Thread by Peter Rilling | last post: by
4 posts views Thread by =?Utf-8?B?UmljaEI=?= | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.