akgulebubekir / Maui.DataGrid

DataGrid component for Maui
MIT License
261 stars 54 forks source link

Fix crash on .NET 9 #201

Closed daltzctr closed 2 months ago

daltzctr commented 2 months ago

Fixes #200

This isn't a great fix in that this library is still not trimming and aot compatible, but this gets it to at least not-crash in client builds. This library was already incompatible for trimming and aot as x:Object previously just forced reflection bindings anyways in .NET 8.

daltzctr commented 2 months ago

I apologize for the formatting changes. My linter decided to reformat the file.

symbiogenesis commented 2 months ago

Thank you for the contribution. I will add AOT and trimming support as a roadmap item, although as you mention it may just force reflection for the time being.

However, I cannot see how this fixes any crash. Seems like it only has formatting changes.

symbiogenesis commented 2 months ago

Ok, I see now it is the x:DataType={x:Null} that is the fix.

symbiogenesis commented 2 months ago

Would be nice to get a force-push without the formatting changes, for clarity.

daltzctr commented 2 months ago

Done.

symbiogenesis commented 2 months ago

I made some attempted changes to improve things with respect to trimming and AOT. Let me know if they seem good to you.