An open API service indexing awesome lists of open source software.

https://github.com/asklar/csx

CSX Compiler
https://github.com/asklar/csx

csharp csx react react-native reactive reactive-programming uap windows xaml xaml-winrt

Last synced: about 2 months ago
JSON representation

CSX Compiler

Awesome Lists containing this project

README

          

# CSX Compiler

### Background
React JS allows embedding html markup in JS (JSX).

### Goal
Can we offer something similar: _embed **XAML** markup inside of **C#**_

* I built a compiler frontend that translates the mix of C#+XAML markup into pure C#
* It’s type-safe and reflects on the types of properties/events/… to emit the right kind of code.
* For example if you say `` it knows that the 24 needs to be interpreted as an `int`, not a `string`.
* It allows repeater-type scenarios inside a container and allows naming objects so that they can later be referenced:
```xml

{
return person.Tasks.Select(todo => CreateToDoItem(todo));
}

```
 
I have a test .netcore3 app using WinForms-hosting-XAML and I’ve integrated the CSX compiler as an MSBuild target rule to convert the CSX into CS.

With this you can modify the CSX file, F5 to rebuild & launch 😊