Alexander S. Alexander S. - 5 days ago 6
C# Question

Nodes in Windows Forms

So I have experience in C++ and I am now messing around in C# .NET with the Windows Forms. I know how to create a new Form, which I can use as a new window. And that you can also create user control, a component or a normal class.

Now I made an application in C++ but I want to convert it to C# .NET. In C++ I made the whole gui myself. But I want to do that now in C# .NET for practice.

In that application, the user could create nodes (Like you can in unreal engine 4 in the blueprints, see example picture)

Now I am unsure what would be the best way to do this in Windows forms.

Making a new form doesn't seem like the correct way. Because the nodes have to be inside of the main screen. And you should be able to move the grid which hold the nodes. So nodes shouldnt be able to exit the main screen that holds them.

Is it better to create it from scratch myself in a class? Or can I achieve this with a user control or component class? I do not understand what the best use of these classes are and what they are used for.

So I want to make something like this, and the question is what is the best type of class to make the nodes with?:
enter image description here

Answer

I think you should use WPF to obtain node-base UI. I developed a program with such an interface in WPF and it was pretty simple (I didn't have any experience in WPF):

enter image description here

You can create almost every layout you want using grids, borders, stackpanels, dockpanels, paths etc.

Comments