CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.28k stars 403 forks source link

Change expander to use the trimming safe binding #2345

Closed pictos closed 1 week ago

pictos commented 1 week ago

This PR updates Expander to use the new and AoT friendly Binding API introduced by .NET MAUI.

With this we can make sure our code is trimming safe. For reference you can watch this part of Peppers presentation on .NET Conf

pictos commented 1 week ago

@brminnick I didn't try out, but when we chated on discord you mentioned that error for TypedBinding... This one, I presume, is a different API. Peppers also mentioned that we should have a better XP on .net 9 GA version, compared to the RC and preview ones.

brminnick commented 1 week ago

Thanks for confirming.

It uses TypedBinding under the hood.

To avoid accidentally injecting runtime errors, I'll close this for now until the Compiled Bindings interceptor has been updated to intercept bindings defined out of scope like these and we've tested + verified they work at runtime.