Skip to content

Need help with ComboBox DropDown & Popup #10060

Open
@naumenkoff

Description

Hello everyone.
I can't figure out how the ComboBox works: for some reason, it has a gray background, and I can't get rid of it.
For example, in NavigationView, I able to remove it by overriding NavigationViewContentBackground to Transparent.
But here it's a completely different situation: I've read tons of articles and looked through the code of many apps that use ComboBox, where it is rendered properly, but I still haven't found a solution.

What I am referring to:

  • In the Settings app (Windows 11), ComboBox has an opaque, non-gray background.
    Image
  • In the MVVM Toolkit Sample App (The Final Result, SubredditWidget), ComboBox has a transparent blurred, non-gray background.
    Image
  • DropDownButton
<DropDownButton Content="Say">
    <DropDownButton.Flyout>
        <MenuFlyout Placement="Bottom">
            <MenuFlyoutItem Text="Hello" />
            <MenuFlyoutItem Text="World" />
        </MenuFlyout>
    </DropDownButton.Flyout>
</DropDownButton>

Image

But for me, everything looks completely different. I don't know how this happened. And why no solutions are working!

ComboBox

It differs from DropDownButton.

<ComboBox>
    <ComboBoxItem Content="Hello"/>
    <ComboBoxItem Content="World"/>
</ComboBox>

Image

ComboBox with overridden ComboBoxDropDownBackground

<ComboBox>
    <ComboBoxItem Content="Hello"/>
    <ComboBoxItem Content="World"/>
    <ComboBox.Resources>
        <SolidColorBrush x:Key="ComboBoxDropDownBackground" Color="{ThemeResource AcrylicInAppFillColorDefaultBrush}" />
    </ComboBox.Resources>
</ComboBox>

Image

I referred to these Issues:

Versions:

  • Nuget: WindowsAppSDK 1.6.240923002, Runtime: 1.6.1
  • net8.0-windows10.0.26100.0
  • Windows 11 Pro 26100.2033

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue needs to be triaged by the area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions