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.26k stars 1.76k forks source link

Support to change Picker popup background color #15316

Open Kerubananthan3761 opened 1 year ago

Kerubananthan3761 commented 1 year ago

Description

In MAUI Picker there is no support to customize picker popup background

Public API Changes

PopupBackground in Picker

Intended Use-Case

In .Net MAUI DataForm Control, while providing support for theme, there is support to change the color of Picker background and text color which are contrast to dark and light theme. We are not able to change Picker popup background color.

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

rachelkang commented 1 year ago

Hi, @Kerubananthan3761 - could you clarify which platform you're particularly seeking this on, and which popup portion of the picker you are referring to? Thanks!

ghost commented 1 year ago

Hi @Kerubananthan3761. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Kerubananthan3761 commented 1 year ago

Hi @rachelkang , I am currently working on Windows platform, but I need to consider for other platform also. Refer the below image, which has picker items. Need to customize the background of the items. image

jeremy-visionaid commented 1 year ago

@rachelkang More that just the requested feature, unfortunately the foreground and background for the popup does not change when setting Application.Current.UserAppTheme (tested on 8.0.0-preview.7.8842)

@Kerubananthan3761 At least a workaround is available by adding resource for the underlying control: https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.comboboxitem

malsabi commented 10 months ago

I'm having the same issue on Picker Control the BackgroundColor of the Menu Dropdown can't be changed specially when setting Application.Current.UserAppTheme to Light, the BackgroundColor of the Menu Dropdown remains black and vice versa.

ChrisK91 commented 6 months ago

I'm running into the same issue. @jeremy-visionaid, were you able to work around the issue where the color is not updated on theme changes?

jeremy-visionaid commented 6 months ago

@ChrisK91 Yeah, you can add brushes for ComboBoxItemBackground etc, to a Microsoft.UI.Xaml.ResourceDictionary. The distribution of the upstream styles has changed, but you should still be able to find all the references you need from the links above.