Styling WPF / Silverlight ComboBox

I am trying to figure out how to change the pop-up part of a ComboBox control. I am not very familiar with custom styles and patterns.

I have a specific popup like in:

<Popup 
      Name="Popup"
      Placement="Bottom"
      IsOpen="{TemplateBinding IsDropDownOpen}"
      .....>
    .... some content
</Popup>

I know that the ComboBox control has a pop-up name named "PART_Popup". How to replace the default implementation with mine?

thank

+3
source share
2 answers

You can use the loaded event and search for this part in the code to replace it, which may not work, because not all PART elements are required. Usually you copy an existing template and change the corresponding parts, you can set the template using the property ComboBox.Template.

, anyhting, .

MSDN:

WPF ( " WPF ." )
Silverlight ( )

+1

All Articles