fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.15k stars 121 forks source link

Fix attached properties #766

Closed TimLariviere closed 4 years ago

TimLariviere commented 4 years ago

Attached properties like Grid.Column, Grid.ColumnSpan had invalid default values because Fabulous was using the designated helper (Grid.SetColumn(child, value)) that has no "unset" equivalent.

This led to crashes in certain conditions.

So instead, Fabulous will now use directly the BindableProperty field (e.g. Grid.ColumnProperty) so it can clear the value if needed.

Happypig375 commented 4 years ago

Should Fabulous.CodeGen be renamed to something like Fabulous.XamarinForms.CodeGen instead? It should be under Fabulous.XamarinForms.

TimLariviere commented 4 years ago

Fabulous.CodeGen generates by default code compatible with XAML-based frameworks (WPF, Uno, Avalonia, XF, ...) so it isn't necessarily depend on Xamarin.Forms.

All the XF specifics are handled by Fabulous.XamarinForms.Generator.

TimLariviere commented 4 years ago

... and thanks. That let me realize I wrote "Xamarin.Forms" in the shared code. :)