Elegantly override style of ComboBox's ToggleButton in WPF

后端 未结 2 1541
难免孤独
难免孤独 2021-02-19 06:13

I have a question regarding how to elegantly override an arbitrary element deep inside a control\'s visual tree. I also have attempted to resolve it in a few different ways, bu

2条回答
  •  独厮守ぢ
    2021-02-19 06:35

    There isn't an elegant solution for this. The best you can do is override the style for the entire ComboBox so that you can change the style it sets for the ToggleButton.

    You can use Blend to get the styles, however that probabliy isn't the easiest way. If you have Blend installed, go to "[Program files or where Blend is installed]\SystemThemes\WPF\areo.normalcolor.xaml".

提交回复
热议问题