Using xaml or json with ETO in C#

eto
csharp

(Diana) #1

I’m having a hard time getting my ETO form (or dialog for that matter) to work in a cross-platform plugin. The basic forms give a NullReferenceException on the JsonReader.Load(this) line (or conversely the XamlReader) defining the forms in C# works fine, but it’s not my preference. Any insight?


(Curtis Wensley) #3

Hi @diana_lp,

Rhino 6 only includes XamlReader (Eto.Serialization.Xaml). However, it is not included in Mac Rhino 5, so you will only be able to use Xaml with Rhino 6 and Mac Rhino 6 when it is released. Note that you also need to reference Eto.Serialization.Xaml.dll that is included with Rhino, as it is strong named.

We do not plan to include Eto.Serialization.Json support in Rhino as Xaml has better capabilities.

So, if you’re intending on creating a cross platform plugin that will work on Mac Rhino 5 and on Rhino 6, you will have to write your UI in C# currently.

Hope this helps!
Curtis.