dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.22k stars 1.75k forks source link

Handle defaults/themes inside Maui.Core #8210

Open PureWeen opened 2 years ago

PureWeen commented 2 years ago

TODO

What should this look like?

Other libraries are already defining their own default styles. Can we provide a cohesive solution in core?

Should we implement this before/instead of/after this https://github.com/dotnet/maui/issues/7800

TimLariviere commented 1 year ago

It would be nice to have at least a central place with all the defaults declared. They seem tightly tied to the handlers provided by Maui.Core, so having them together in the assembly would make sense.

I'm currently implementing Maui.Core in Fabulous, and I had to look into all BindableProperties of Maui.Controls to extract those defaults.

Right now, I have all the following defaults: https://github.com/fabulous-dev/Fabulous.Maui/tree/main/src/Microsoft.Maui.FabCompat/Handlers/Defaults