Eto.Form in C#

I’m trying to learn to use Eto.Forms. I found quite informative Python guide on:

https://developer.rhino3d.com/guides/rhinopython/eto-forms-python/

But I’m not able to transform it to C#. Is there any beginner tutorial for Eto.Forms in C# (in Grasshopper)?

I’m not even able to import Eto library by:

using Eto.Forms;

which throws me error:

Error (CS0246) : The type or namespace name ‘Eto’ could not be found (are you missing a using directive or an assembly reference?)

1 Like

have you got the reference to the eto.dll? if not, you might have to go to “tools” - “nuget package manager” - “manage nuget package for solution…” and look for “eto”, install eto.forms package.

1 Like

Thanks,
When I will be coding in Visual Studio I will try it. Currently, I am using an internal C# Editor in Grasshopper. So I guess there it wouldn’t be that easy.

Never do GUI in script components (C#) unless you really know what you are doing. Always use Visual Studio (or other IDE’s) for this. A good starting point may also be WPF in Visual Studio. Since Eto is wrapping around it on Windows you can indirectly learn Eto. With the difference that WPF is much better documented. Learn WPF with CodeBehind. Not the MVVM pattern since this would be an absolute overkill (and some online sources are often incorrect, spreading more confusion).

1 Like