By default, dropdown background color of picker in .Netmaui seem to be set as Gray200; Please tell me how to change it by customized color.
I already set this:
<Picker.Resources> <SolidColorBrush x:Key="TransparentBrush" Color="#464E51"/> <!--<SolidColorBrush x:Key="TransparentBrush" Color="Transparent"/>--> </Picker.Resources>
but it's fail to change background color of the dropdown
CodePudding user response:
You could add some code in the Project/Platforms/Windows/App.xaml file:
<maui:MauiWinUIApplication
...
xmlns:local="using:MauiApp11.WinUI">
<!--Add the following three lines-->
<maui:MauiWinUIApplication.Resources>
<SolidColorBrush x:Key="ComboBoxDropDownBackground" Color="#464E51" />
</maui:MauiWinUIApplication.Resources>
</maui:MauiWinUIApplication>
Hope it works for you.