Why isnt my Background color working in a ComboBox

Jim Michaels

The only part of my Combo Box that isn't working is the Background Color. I want the whole thing to be yellow. But the collapsed part is still just gray.

<ComboBox Height="25" Width="125" Background="Yellow">
    <ComboBox.ItemContainerStyle>
        <Style TargetType="ComboBoxItem">
            <Setter Property="Background" Value="Yellow"/>
            <Setter Property="BorderBrush" Value="Yellow"/>
        </Style>
    </ComboBox.ItemContainerStyle>
    <ComboBoxItem Content="One"/>
    <ComboBoxItem Content="Two"/>
    <ComboBoxItem Content="Three"/>
</ComboBox>
Narayana Erukulla

Your code should work as expected while using wpf with windows 7. However if you are running windows 8 or later, the same may not apply.

This https://blog.magnusmontin.net/2014/04/30/changing-the-background-colour-of-a-combobox-in-wpf-on-windows-8/ might help you in achieving what you want.

The author has given a very good explanation regarding the same.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why isnt my Background color working in a ComboBox

From Dev

Why isnt my middleware working?

From Dev

Why my code isnt working?

From Dev

Why isnt my foreach loop working?

From Dev

Why isnt my update from client working?

From Dev

Why this regex isnt working?

From Dev

why isnt this padding working?

From Dev

Why this code isnt working?

From Dev

Why isnt ActionListener working?

From Dev

I can't figure out why my clearfix isnt working

From Dev

Is there a reason why my clearInterval function isnt working in React?

From Dev

I can't figure out why my clearfix isnt working

From Dev

Why isnt my nested ng-repeat working

From Dev

not sure why my looping function isnt working here

From Dev

Why isnt Bootstrap Grid working properly after my main header?

From Dev

Would like to understand why this "setInterval" in my code isnt working?

From Dev

Why is my background color not displaying?

From Dev

My bcrypt gem isnt working

From Dev

my foreign key isnt working?

From Dev

My jquery click isnt working

From Dev

Why .hasClass function isnt working?

From Dev

Why isnt Gesture Listener working?

From Dev

Why isnt this simple inheritance working?

From Dev

Why change background color javascript not working?

From Dev

Why isnt my jquery changing my div?

From Dev

My SaveCommand Button isnt working in UWP why?? I use MVVM Pattern

From Dev

Why is the background color of my drawable view black?

From Dev

Why is my background color not applied (Aspose Cells)?

From Dev

My collection of OO class isnt working?