Skip to content

Infragistics Community Forum / General / Disable Snaplines in WinForms Designer

Disable Snaplines in WinForms Designer

New Discussion
Sandeep Shukla
Sandeep Shukla asked on Nov 25, 2015 3:05 PM

How can i disable snaplines (which is shown in the above image) in design mode( custom form with custom controls using Infagistic dlls) when we move the controls using the mouse.

Sign In to post a reply

Replies

  • 0
    Milko Venkov
    Milko Venkov answered on Nov 25, 2015 2:51 PM

    Hello Sandeep,

    Thank you for posting in our forum.

    Windows Forms designer is designed to work in two layout modes: SnapLine and SnapToGrid. In order to turn of the snap lines you may switch to SnapToGrid layout mode. Please note when switch to this mode you may also consider to set Default Grid Cell Size, Show Grid and Snap to Grid properties. More about Windows Forms Designer options you may find by following the next link
    https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(VS.ToolsOptionsPages.WindowsFormsDesigner.General);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.0)&rd=true
    .

    Please let me know if you need any additional information.

    Thank you for using Infragistics Components.

  • 0
    Mike Bowshewicz
    Mike Bowshewicz answered on Nov 25, 2015 3:05 PM

    Hi Sandeep,

    This is a designer-level setting in Visual Studio and will be configured by the developer. I found a discussion on StackOverflow which describes this, and in which you participated:
    http://stackoverflow.com/questions/33756441/disable-snaplines-in-windows-froms-designer 

    I will summarize some of the main points here:

    • In order to temporarily overwrite the setting, you can hold down the Alt key while moving the control.
    • If you would like to turn it off permanently, you can go to Tools > Options > Windows Forms Designer > General. From there, set the Layout Mode option to SnapToGrid. You may also want to set the Snap to Grid option to False. You will need to restart the designer for these changes to take effect.

    In the StackOverflow discussion, you asked about how this setting could be modified in code, and you elaborated that you are working on developing custom controls. You can override this setting by using the ControlDesigner class:
    https://msdn.microsoft.com/en-us/library/system.windows.forms.design.controldesigner(v=vs.110).aspx

    Please let me know whether I can assist you with any further questions related to Infragistics controls.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Sandeep Shukla
Favorites
0
Replies
2
Created On
Nov 25, 2015
Last Post
10 years, 3 months ago

Suggested Discussions

Created by

Created on

Nov 25, 2015 3:05 PM

Last activity on

Feb 23, 2026 1:17 PM