N
N
Nikolay Alekseev2020-03-15 08:42:02
.NET
Nikolay Alekseev, 2020-03-15 08:42:02

It takes a lot, but it's not difficult to draw. Which approach to choose?

Good day to all!
Previously, I asked a question about binding child elements to canvas, I never received an answer to it, and after spending a certain amount of time reading the Internet, I came to certain conclusions, but I would like to consult with more experienced comrades.

And so: the idea is that I need to visualize the relationship between objects. This is similar to nodal visual programming, or building a database model, where a bunch of blocks are interconnected by lines, all of them can be dragged around the form and somehow interacted.

Initially, I created a component that was a child of Canvas, but this was done simply so that when it was created, it would fill itself with a grid over the background, and so, in fact, it remained the same canvas.

There are several tasks that this crap should perform:

  • Hosting nodes (which are user controls)
  • Dragging those same nodes across the canvas freely
  • Zooming in on this whole farce
  • Move the whole circuit with the mouse


I try to adhere to the mvvm pattern, but in this particular case, I have already resigned myself to the fact that it will most likely be completely impossible, so I will look for solutions in wider horizons.

And here are the solutions I came up with.

  • Continue to write as I already started, using the canvas and taking out what cannot be bound into the bare code of the view
  • Go one level down and write your own control that will perform all the functions I need
  • Find some other, ready-made solution and apply it
  • Get down to a very low level and screw up the whole application, not using all your wpf, canvas, etc. Perhaps for this it is worth abandoning Sharpe and switching to pluses.


I ask more experienced colleagues to advise where and how to dig in this case? Which approach would you choose?
Many thanks in advance to everyone!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2020-03-15
@VariusRain

in my opinion, the classic case when I don’t know what it’s called creates a big problem
- as far as I remember, the task still hasn’t become trivial, but there are already solutions in the set
- the first approach [to the projectile] c# graph visualization
- the second approach to the projectile now I’ll dig in the bins and throw in links, that is, I will update the answer, I’ll try not many times (well, there can’t be any guarantees of exact suitability here)
.. or paid ones are not needed at all? (then github - search for the right words, and hit me so that I don't spam with paid solutions late))).. candidates went:
- https://www.yworks.com/products/yfiles-net
- https://www.nwoods.com/products/godiagram/
- https://www.nevron.com/products-dot-net-vision.aspx
.. to be continued perhaps I exaggerated my bins (actually something almost all popular paid lib vendors can be found, but I checked for compliance with the request, as I understood it)
ps I hope I conveyed my point of view, and if at least some point is useful, then it's generally super. good luck! ))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question