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

落爺英雄遲暮 提交于 2020-01-24 14:07:44

问题


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.



来源:https://stackoverflow.com/questions/490294/changing-the-style-of-a-combo-box-in-wpf-in-blend-preferably

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!