Materialdesigninxamltoolkit: ComboBox background color should allow transparent

Created on 5 May 2016  路  10Comments  路  Source: MaterialDesignInXAML/MaterialDesignInXamlToolkit

The new version of Material Design XAML Toolkit applies a background color to the ComboBox control which can be an issue when displayed in a ListView which has alternating row colors:

dr

It would be great to have a way to toggle the background to transparent on ComboBoxes, so the background color is not applied. Thanks.

Most helpful comment

@ButchersBoy i think so.
I suppose i will do a PR in a few days. Sorry, i had a vacation (spent in Czech).

All 10 comments

@arc95 you can set ComboBox's Background property

@l1pton17 That's not going to address it, as I just tried it. I only want the box to be transparent when it's closed. This makes it transparent also when the user clicks to open it, letting the background bleed through all the items.

@arc95 sorry, made a mistake. You have to manually set background color of comobobox according to panel background.

@l1pton17 How do you do that in a ListView with alternating row color and keep the color from also affecting all the items in the dropdown?

@arc95 With RelativeSource ComboBox Background="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}, Path=Background}"

@arc95 but i agree with you, transparent mode need a fix :smile:

Thanks, @l1pton17. If I knew more about WPF, I would implement what you're suggesting. For now, I'll wait for a fix from the experts :smile:

What's status on this? Do we still have an issue?

@ButchersBoy i think so.
I suppose i will do a PR in a few days. Sorry, i had a vacation (spent in Czech).

@ButchersBoy i think so.
I suppose i will do a PR in a few days. Sorry, i had a vacation (spent in Czech).

So with this PR the popup background in the original example of this issue is sometimes white and sometimes blue? I don't think that this is exactly what we always want. I don't see even a way to override this "auto" background.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greuelpirat picture greuelpirat  路  12Comments

mgnslndh picture mgnslndh  路  13Comments

Tyrrrz picture Tyrrrz  路  12Comments

shunjid picture shunjid  路  23Comments

maciz84 picture maciz84  路  36Comments