-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggest: script Language support #1920
Comments
Avalonia has talked about doing this in the past: AvaloniaUI/Avalonia#2502 Any syntax ideally would be coordinated with other XAML-based UI framework implementations. |
@robloo They don't plan to add a script language, they just want to change XAML to another expression. but I want to add some simple logic code: |
@chrisglein as FYI |
Definitely an area where I have some passion :) I've done some explorations into using XAML without markup and leaning into language features and utilities to get a mix of structure (which markup does well) and logic/binding (which script does well). Not with script though, just with plain old code (either C# or C++). I was inspired by JSX, which is how React mixes HTML markup and JavaScript into a single document. I think there's something interesting here about the overlap of XAML and alternate coding patterns, but it would benefit from some slight API changes (to make a couple things code-friendly) and language utilities. One of the challenges is not inventing something too new (thus creating a larger learning barrier for the platform), but instead combining pre-existing familiar concepts. Asking developers to learn a new markup language is actually a tall order. I think JSX succeeds because it's a blend of two of the most well known technologies in the world: HTML and JavaScript. I'd love to see how others are experimenting in this space, because it feels like there's a lot of room for innovation. |
Check out this idea: #2499 "Proposal: Support Blazor Syntax" |
Suggest:
Many people think that XAML is too verbose and inflexible (http://paulstovell.com/blog/six-years-of-wpf china web site :https://www.zhihu.com/question/44666716 ). Can you add a new "UI language" like QML (or TypeScript)?
E.g:
Now has a textblock, name = tb1
else his width is 100.
XAML:
<TextBlock x:Name="tb1" Text="{Binding ElementName=scrollBar1, Path=Value,Convert=......}" width={Binding .......}/>
QML or other script:
---------------end--------
like this.......
qml doc: https://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html
related issues :
#728
The text was updated successfully, but these errors were encountered: