I just need to add a thick border around the ComboBox. As you may already know, ComboBox's BorderThickness property is not of much use. So I'm trying to modify the Template using following style, but can't figure out what I need to write inside the Border tag to represent the ComoboBox itself:
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Border BorderBrush="Black" BorderThickness="2">
WHAT GOES HERE?
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
I have tried ContentPresenter and ContentControl but honestly don't know much about their usage in this particular scenario.
Well if I get you right, you want to put the original ComboBox in that Border, right? You can find an example template customization here.
So if you copy the important part (the Grid) in your Border it should look like the standard ComboBox with a thicker Border. Perhaps you will have to do some minor modifications, so that it looks perfect. Btw, MS Blend would be a great help here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With