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

Need help with ComboBox DropDown & Popup #10060

Open
naumenkoff opened this issue Oct 12, 2024 · 1 comment
Open

Need help with ComboBox DropDown & Popup #10060

naumenkoff opened this issue Oct 12, 2024 · 1 comment
Labels
needs-triage Issue needs to be triaged by the area owners

Comments

@naumenkoff
Copy link

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
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Oct 12, 2024
@whiskhub
Copy link

It's a bug in WinUI 3. Currently only in WinUI 2 (UWP) there is an acrylic background, sadly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

2 participants