Page 1 of 1

XAMLToy Question

Posted: 27 Aug 2021, 16:28
by stonstad
XAMLToy is very impressive. I am thinking about a feature for my game that might allow end users to create their own faction decals for starships. XAMLToy shows how slick such a solution might be for end users. The plan would be to render the Noesis output to a Unity texture and apply it to 3D models. Could this be feasible with Noesis and Unity3D?

* Are there any specific API calls that are helpful to recreate the XAML toy workflow?

* What does XAML today use for syntax highlighting and code completion suggestions?

* Are there any security considerations I should be mindful of?


Thank you!

Re: XAMLToy Question

Posted: 30 Aug 2021, 11:47
by sfernandez
Are there any specific API calls that are helpful to recreate the XAML toy workflow?
XamlToy simply loads the xaml text into a Border container by using Noesis.GUI.ParseXaml().
When the xaml requires other resources (like xamls, images, fonts) they are first registered in the corresponding resource providers to correctly load them.
What does XAML today use for syntax highlighting and code completion suggestions?
For XamlToy we use https://codemirror.net/ with a json file for the auto completion suggestions list.
Are there any security considerations I should be mindful of?
XamlToy does not allow to inject new classes (code), it just uses the default classes provided by Noesis, so there are no security issues to worry about.

Re: XAMLToy Question

Posted: 30 Aug 2021, 16:36
by stonstad
Thanks, Sergio!

Re: XAMLToy Question

Posted: 31 Aug 2021, 15:56
by jsantos
So basically, if we had something like codemirror for C#, having XamlToy would be trivial (more or less). Or maybe embedding VSCode or something like that. We already have the grammar for autocomplete.

Re: XAMLToy Question

Posted: 31 Aug 2021, 20:20
by stonstad
My question is answered and so this is a tangent. The new Unity UI isn't very feature rich or performant. If Noesis provided an in-Unity editor I think Noesis would overcome some of the "first time user" complexity. Blend isn't exactly popular many devs (including myself) prefer typing XAML.