maui icon indicating copy to clipboard operation
maui copied to clipboard

Give developers more (full) control over control colors

Open Symbai opened this issue 2 years ago • 3 comments

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.

Symbai avatar May 27 '22 16:05 Symbai

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.

ghost avatar Aug 24 '22 12:08 ghost

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.

Juansero29 avatar Nov 20 '22 22:11 Juansero29

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

tekinomikata avatar Nov 26 '22 11:11 tekinomikata

has any traction been gained on this topic?

LennoxP90 avatar Dec 05 '22 18:12 LennoxP90

Any updates?

Compy avatar Aug 01 '23 04:08 Compy

Bump

Denny966 avatar Oct 11 '23 14:10 Denny966

+1

BenEastpoint avatar Oct 27 '23 14:10 BenEastpoint

Any updates?

mhrastegari avatar Mar 13 '24 22:03 mhrastegari