.net - With Winforms, how do I make a graphics pane that can be dragged, zoomed/unzoomed, and items inside selected? -


I am using C # and .NET 3.5 to create Winforms applications.

I need a pane that displays a tree of connected geometrical objects. I want to be able to click-drag to move around the scene, use the mouse wheel to zoom in and Click to exclude and click to select item.

I can see that this code would be possible for everyone using a picture box and event processing and a bunch of maths. I am not against doing this but if there is a solution already available for this (or any recommendation about better control for the job), then I will not have to face all the hassle of writing this GUI content.

I mentioned this in a comment earlier, but possibly best to create custom user controls The solution is You can handle special events that you want to handle (mousedown, mouse, mouse, keyboard events, etc.).

Create a picture and set it as a background for control, then you can add control (or many controls!) To your form for your purpose.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -