-
Notifications
You must be signed in to change notification settings - Fork 10
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
Compiled Binding support for Avalonia #2
Comments
|
WPF平台也有x:Bind的实现了,https://github.com/levitali/CompiledBindings |
可惜的是WPF本身用到了许多反射,还无法NativeAOT |
以及大量COM() |
是的,DX是COM, Windows Only 😿 |
目前,在 Avalonia 11 开始。Avalonia 项目可以通过修改编译选项来全局开启 “编译绑定”。
启用编译绑定后可以完全舍弃基于反射的绑定,这对于需要启用 NativeAot 的平台(安卓与IOS)是非常关键的。
当前项目的内部实现依旧是使用基于反射的绑定类来实现多语言切换的。如果可以切换至纯编译绑定将会大幅度提升跨平台的可用性。
由于我暂时还没有完全掌握项目代码。因此,我可能无法提交 PR 😂,作者如果可以的话不知能否尝试将内部实现切换为编译绑定?
我这里可以提供一段我在自己项目内使用的一段 helper function 来帮助您创建编译绑定:
The text was updated successfully, but these errors were encountered: