Closed ghost closed 8 years ago
The body of your issue seems to be mangled.
One option for XAML would be to feed the XAML through the normal MS build pipeline and translate the managed code their compiler generates. Not sure how hard that would be, though...
I currently tried referencing System.Xaml
, but this references all the PresentationFramework
and PresentationCore
assemblies, which do not seem to decompile well with JSIL. I guess I'll try writing a custom implementation or something.
I have, however, been having trouble with the dynamic
keyword. Is there anything special I should do when using dynamic
with JSIL, like the DynamicAttribute
or something?
Yeah, I think at present you wouldn't want to cross-compile the implementation. Just cross-compile the code generated by the compiler from your XAML files. This is similar to what is done for XML Serializer assemblies.
Is there a way I can use XAML without referencing PresentationCore and PresentationFramework? These aren't necessary but my compiler insists that I reference them.
@0xFireball. have you looked on Fayde projects? They implement XAML in html/js on top of canvas. It would be great if somebody would implement bindings to it, and it would be great if they will be wpf/silverlight compatible.
@0xFireball, could you describe what type of problems do you have with dynamic
?
Also it may worth to look on https://github.com/Perspex/Perspex, it should be much easier to port it to be used with JSIL.
Thanks! I'm trying to make an open source alternative to CSharp/Xaml for Html5
I resolved the issue with dynamic. Sorry about that, it was bad implementation on my part.
Hello, if this is still relevant, I succeeded in creating a usable UI framework built upon JSIL! https://github.com/exaphaser/SharpJS
After writing the UI framework, I wrote another library (It's in the repo too that would allow users to port WinForms projects to the web.)
It's obviously not production ready at the moment (I didn't spend that much time on it), but it's a start for a compatibility layer for WinForms. At the moment, you still have to recompile the project to reference my WinFormsCompat lib (or you could hack the assembly).
I also made C# bindings for some of jQuery (as much as the whole framework needed, I might add more) and WebSockets, AJAX, JS Buffers, Printing, Blob saving, and uploading.
I also have some bindings for DOM, which I used in some libs.
I paused development a couple months ago, but I'm restarting development again. This time, I'm going to improve the UI framework and maybe try adding some XAML-inspired UI.
I'm looking at Fayde for ideas for now.
The extensions are licensed under GPLv3 in the repository, but if a merge would help JSIL, I would be delighted to give the changes back to JSIL under the MIT license. Just please let me know.
Unfortunately I messed up massively with Git, and that repo does not share a history with JSIL :( and I had to manually merge changes. That was a big mistake, but I don't want to lose my own commit history now. If anyone has a solution please let me know, I would really appreciate it.
Worst case you could generate a single massive merge commit (ugh) by doing a diff of the whole tree against JSIL. Maybe then you could split the commit up into logical chunks.
Is there a way I can use XAML with JSIL? I am creating a C# to HTML5 GUI framework and would like it to be usable with XAML. Currently, layouts can be built like this:
I want to be able to specify this instead:
Does anyone know how I can implement this? Please do not mention CSHTML5, as it is closed source and my project is open source.