Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to change Picker popup background color #15316

Open
Kerubananthan3761 opened this issue May 29, 2023 · 8 comments
Open

Support to change Picker popup background color #15316

Kerubananthan3761 opened this issue May 29, 2023 · 8 comments
Labels
area-controls-picker Picker proposal/open s/needs-attention Issue has more information and needs another look t/enhancement ☀️ New feature or request
Milestone

Comments

@Kerubananthan3761
Copy link

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.

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 30, 2023
@rachelkang rachelkang added this to the Backlog milestone May 30, 2023
@ghost
Copy link

ghost commented May 30, 2023

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 rachelkang added the t/enhancement ☀️ New feature or request label May 30, 2023
@rachelkang
Copy link
Member

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!

@rachelkang rachelkang added the s/needs-info Issue needs more info from the author label May 30, 2023
@ghost
Copy link

ghost commented May 30, 2023

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
Copy link
Author

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

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels May 31, 2023
@jeremy-visionaid
Copy link
Contributor

@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
Copy link

malsabi commented Jan 27, 2024

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
Copy link

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
Copy link
Contributor

@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.

@Eilon Eilon added area-controls-picker Picker and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-picker Picker proposal/open s/needs-attention Issue has more information and needs another look t/enhancement ☀️ New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants