maui
maui copied to clipboard
Give developers more (full) control over control colors
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.
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
This definitely needs some looking at, most of this properties are not customizable from Styles.xaml, nor from the control itself. Are we supposed to do specific handlers just to change a couple of colors for the SearchBar? Seems like a wasted effort, it should be included in the base framework.
Indeed a very frustrating experience trying to change the colors only to find out most of it cannot be easily changed thru the styles/colors xaml, this would be very welcome as an easy way to customize controls without having to rewrite a lot of customizations or create your own view
has any traction been gained on this topic?
Any updates?
Bump
+1
Any updates?