-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Give developers more (full) control over control colors #7542
Description
Description
When creating a new MAUI Project there is a Styles.xaml file with styles and colors of controls. However even when all colors in there have been changed, a lot of MAUI controls still have its own (hardcoded?) colors. Just to name a few:
Entry - Cannot change color of caret and underline
Popup - Cannot change the cancel button foreground
Searchbar - Cannot change the searchbar icon foreground
Flyouts - I can change the background color via property but the title foreground I cannot change unless I add my own item template.
I don't know if the styles in Styles.xaml are just incomplete and these things can easily be changed by overriding a property in those styles or if they are really hardcoded. But in both cases this needs to get addressed. There are so many public properties about colors on all controls but it feels extremely incomplete just like the Flyout example.
Public API Changes
Like I said above if there is a property for background, make sure there is a property for foreground as well. If there is no property at all, make it style-able in Styles.xaml showing how to. And remove all hardcoded colors instead bind them to the colors specified in Styles.xaml
Intended Use-Case
Quite obvious, if I define my own background color for pages most controls don't fit. Or when I define my own accent color to yellow and some of the controls have their accent to default MAUI purple (like Entry), it don't fit again.