By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,896 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,896 IT Pros & Developers. It's quick & easy.

Custom snapline in usercontrol

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.