Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Snaplines in CustomDesigner
 

Snaplines in CustomDesigner

I've implemented a DesignSurface that uses blank UserControl and a basic DocumentDesigner. The code is based on this blog: http://bloggingabout.net/blogs/perikles/archive/2006/11/25/Using-the-Windows-Forms-designer-as-your-custom-Design-editor.-_2800_Part-I_2900_.aspx

When I do run this designer, snaplines do not appear. What can I do make the snaplines work?

I'm using VS2008. This will end up in a VSPackage that will run under the VS Shell.
Thanks!

FBNitro  Wednesday, January 30, 2008 6:39 PM

Hi FBNitro,

You can try to override the SnapLines property of your custom designer. This property returns a list of SnapLine objects representing significant alignment points for this control. It should work if override this property. Here is a sample for your reference.

· http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1636723&SiteID=1

More information about designer time feature, please visit:
http://msdn.microsoft.com/msdnmag/issues/06/03/designerhosting/default.aspx

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Saturday, February 02, 2008 7:20 AM

Hi FBNitro,

You can try to override the SnapLines property of your custom designer. This property returns a list of SnapLine objects representing significant alignment points for this control. It should work if override this property. Here is a sample for your reference.

· http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1636723&SiteID=1

More information about designer time feature, please visit:
http://msdn.microsoft.com/msdnmag/issues/06/03/designerhosting/default.aspx

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Saturday, February 02, 2008 7:20 AM
I ended up reworking the code to use the CoreDesigner and everything is working as expected now. Thanks for the reply.
FBNitro  Friday, February 08, 2008 3:35 AM

You can use google to search for other answers

Custom Search

More Threads

• Changing default control spacing used by snaplines
• How to make form movable but prevent maximize
• Creating new custom ToolStripItems
• Problems with object type Data Sources in Visual Studio
• same class- different constructors
• Creating Tree View in Datagrid in VB.Net 2005?
• UserControl with an ArrayList property raises an editor error.
• CollectionEditors & ComponentDesigners
• How do I add a control with code serialialization?
• Empty in datetimepicker, when user click pick current date.