Hello,
I'm styling my Pickers as described in one comment here:
https://github.com/dotnet/maui/issues/13418
<maui:MauiWinUIApplication.Resources>
<SolidColorBrush x:Key="ComboBoxItemForegroundPointerOver" Color="#00FF00" />
<SolidColorBrush x:Key="ComboBoxDropDownBackground" Color="#444444" />
<SolidColorBrush x:Key="ComboBoxItemForeground" Color="#FFFFFF" />
<SolidColorBrush x:Key="ComboBoxForegroundPointerOver" Color="#FFFFFF" />
<SolidColorBrush x:Key="ComboBoxItemForegroundSelected" Color="#FFFFFF" />
<SolidColorBrush x:Key="ComboBoxItemForegroundSelectedPointerOver" Color="#00FF00" />
<SolidColorBrush x:Key="ComboBoxItemForegroundPressed" Color="#FF00FF" />
<SolidColorBrush x:Key="ComboBoxForegroundPressed" Color="#FFFFFF" />
<SolidColorBrush x:Key="ComboBoxItemForegroundSelectedPressed" Color="#00FF00" />
<SolidColorBrush x:Key="ComboBoxItemBackgroundSelected" Color="#777777" />
<SolidColorBrush x:Key="ComboBoxItemBackgroundSelectedPointerOver" Color="#777777" />
<SolidColorBrush x:Key="ComboBoxItemBackgroundSelectedPressed" Color="#777777" />
</maui:MauiWinUIApplication.Resources>
This approach correctly styles my pickers when used in a ContentPage. However, if I use a picker in a toolkit:Popup, it does not style the picker correctly. I tried setting the color brushes directly to the popup resources, but it did not work. The described behavior can be reproduced with this repository:
https://github.com/nuxosio/maui-pickers-popup
If you check in my reproduction repository, you will see a picker in the MainPage with a green color while hovering. If you open the popup, the same picker is there, but the green color is not seen anymore.
I hope someone can give me some ideas for solving this issue.