Click here to Skip to main content
15,891,900 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SHORT DESCRIPTION: Am interested in how to implement basic snapping functionality among drag/drop-able custom controls in C#, where to start and can anyone give any pointers to something similar etc.

For simplicity, assume Button Control, I have a ToolBox of Buttons in my App, User drags and drops them on an area, if 2 buttons are placed CLOSE together vertically or horizontally, they SNAP in place - like in a GRID.

=======================================================================
EDITED to be a non-vague-ish question


Hi, so I am wanting to make a scratch like software on m own, for Arduino and other robotics stuff, YES, I have seen at the different variants of scratch and snap and all similar versions - but I want to make my own.

I know somewhat C# and am an electronics engineer, so how do I go about making custom controls which have basic support of dragging/dropping (I think that is already available in C#/.Net), Snapping to one another (this will need to be type based snapping later, but for now simple snapping) and a ToolBox like view in my program from where user can get those blocks (this is not the custom control part).

Any pointers, ideas, suggestions in this regard would be great, I plan to keep it open source and this is more of a learning exercise for myself then to finish it any time soon - THANKS for your time and any help in advance. :)
Posted
Updated 1-Jul-15 22:13pm
v2
Comments
Myaksi 17-Apr-20 18:09pm    
Hello there, I'm trying to do the same thing and I couldn't find any solution for snapping, I would appreciate if you can help if you ever found any helpful links for your question.

1 solution

See https://www.google.com/search?q=drag%20drop%20c%23[^]. Google is always the first place to search for general information.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900