Skip to content
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

Make all bindings compiled bindings #138

Merged
merged 1 commit into from
May 5, 2023

Conversation

aldelaro5
Copy link
Contributor

Compiled bindings helps a ton with trimming compatibility which is required for native aot. Currently, to make nativeaot work, you need to add messagebox.Avalonia in your root descriptors. This has worked for me, but when I inspected why I needed to do this, I found that all the bindings of this lib were on reflection and I when I tried to convert them to compiled, I only saw problems with the tags properties on buttons.

However, looking further into it with dev tools, I found they were not resolving to anything so they had null. This implies that the way they were bound was already not really doing anything useful.

Being surprised at how easy it was to switch over to compiled bindings, I submit this pr to simply do it. It can avoid having messagebox.avalonia getting trimmed out without manual interventions. I also couldn't see any breakage in the test project.

@CreateLab CreateLab merged commit 87f503d into AvaloniaCommunity:master May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants