Page 1 of 1

[Unity] Using Microsoft.Expression.Drawing controls

Posted: 08 May 2014, 10:26
by Basp
We're currently building a project in Unity Pro using NoesisGUI and are running into a problem when using third party libraries. For instance, we would like to use the RegularPolygon defined in Microsoft.Expression.Drawing.dll. Adding a RegularPolygon in Expression blend obviously adds a namespace definition for this library to the document:

xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"

As expected, this causes Unity to throw up the following warning:

[DX9] Assets/GUI/cameragui.xaml
Ignoring unknown type 'RegularPolygon' (@106,7)

This makes sense, because unity/noesisgui probably isn't aware of Microsoft.Expression.Drawing.dll. However, I can't figure out how to reference this library so that noesisgui can render the controls defined within. I tried adding Microsoft.Expression.Drawing.dll as an asset, but this causes an internal compiler error: "Unhandled exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded."

What am I doing wrong?

Re: [Unity] Using Microsoft.Expression.Drawing controls

Posted: 08 May 2014, 10:55
by jsantos
Hi,

noesisGUI is not binary compatible with WPF extensions. This means that any new namespace must be reimplemented again using the noesisGUI API. Being both APIs very similar this tasks is not very complex although in this case you don't need it at all because you can convert all the Shapes included in Blend to Path by selecting the shape and clicking on Path -> Convert to Path.

In the future we should add compatibility with this shapes.

Re: [Unity] Using Microsoft.Expression.Drawing controls

Posted: 08 May 2014, 11:07
by Basp
Thanks for the fast reply!

Converting the shapes to a path is good enough for now. Compatibility with the blend extensions would be welcome though, I'm looking forward to seeing that added to noesisGUI.