microsoft / microsoft/automatic-graph-layout
How can I let a user move/pan the WinForms graph using the mouse wheel?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 319
- Avg merge
- 38m
- Merged PRs (30d)
- 1
Description
Hello everybody!
As this is my first post here: A big warm hand and a very big THANK YOU for MSAGL!
Using the current NuGet, there are no scroll bars any more (I used an older version up to today). OK, but then how to pan using the mouse wheel? Currently, the WinForms graph viewer zooms using the wheel, which is fine. Handling the MouseWheel event of the control allows me to use the Pan() method, but this is in addition to the control handling the event and zoom, which gives a very strange result. As the viewer class is sealed, I cannot override something. So how could I use the MouseWheel event and just pan without having the control zooming when the user, for example holds down ctrl or shift for vertical/horizontal panning please? Or is there another nice method to allow the user pan over long distances (not only holding the mouse button down and drag)?
Best Regards,
Stefan Falk
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WinForms graph viewer's MouseWheel handling and the Pan() method mentioned in the issue. Check how ordinary wheel zooming is triggered and how modifier keys such as Ctrl or Shift could distinguish vertical or horizontal panning. Done means modifier-wheel input pans without also zooming, while unmodified wheel input keeps its existing zoom behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100