Styling ComboBox

I am very new to WPF and apologize if this is so stupid. Do not ignore this duplication.

When I browse the Internet to find out how to style a ComboBox , I can find so many encodings that are so long. They rewrote the style for all parts in ComboBox .

My question is, if I need to change only the combobox toggle button template, how can I do this. I do not want to write the whole style for combobox. Is it possible to achieve?

Thank you at Advance.

EDIT

I will explain my problem further. I need to remove the light blue color if MouseOver ComboBox. I think I can solve this problem by connecting the Toggle button template from Combobox. That is why I am looking for that it is possible to rewrite the part (only the toggle button) in the combo box.

+4
source share
1 answer

Unfortunately, there is no easy way to style only part of a control in WPF. You usually need to duplicate the original template and modify it for your purposes.

The upside is that templates for controls (including combobox) are widely available.

Here is a specific example of changing a toggle button . In this example, if you delete the triggers, you can get the desired result.

+3
source

Source: https://habr.com/ru/post/1446927/


All Articles