Changing the style of a Combo-Box in WPF (in Blend

2019-07-11 05:13发布

问题:

I'm having some issues trying to change the look / style of a combo box in Expression Blend / WPF. While there are tutorials out there describing setting styles for buttons, there seem to be a few wrinkles with ComboBox controls.

Can anyone offer any advice, or point me towards good tutorials that cover re-styling something more complex than a button?

回答1:

The ComboBox style template has 3 parts to it.

The ContentPresenter you should have come across styling Buttons.

There is a Part_Popup that you should find easy to change properties on and style.

The last part is a ToggleButton, to style that you need to "edit a copy" again and create another new style template for the ToggleButton.



回答2:

Have a look at BeaCostas SolarSytem Listbox it's a lovely piece of work.