# .NET and More > WPF, WCF, WF >  [RESOLVED] Rounded Combobox

## dee-u

Why does the dropdown arrow disappears when I try to use the following code? Is there any other method which I can round out the corners of the combobox? Thanks!



```
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
    <Grid>
        <Border x:Name="border" Background="White" BorderBrush="#FFFFC934" BorderThickness="2" CornerRadius="10,10,10,10" Width="Auto" Height="Auto">
        </Border>
    </Grid>
</ControlTemplate>
```

----------


## chris128

I'm no expert on control templates but I think when you define a control template you are defining the entire control. So the combobox that you apply that template to will be JUST that border that you have defined and nothing else - hence the drop down arrow disappearing.
From what I remember, you can assign special names to "parts" of your control template and then WPF will treat them in the same way as their standard control counterpart. For example the little dropdown arrow might be named PART_DropDown in the standard combobox control template, so if you define something in your template and name it that same name then WPF will make it do the same things as the normal one would do (but without the same visual effects obviously as thats for you to define). I'm not sure whether the little arrow in a combobox is actually a separate part though, but you can find out by using Expression Blend to edit a copy of the combobox control template and examining the 'internals' of it.

Sorry if any of the above is not 100&#37; correct but its been a while since I did anything like that. Have a look on the web for Control Template tutorials  :Smilie:

----------


## dee-u

Upon searching and trial and error I was able to get the look that I want. It occured to me that a ComboBox is composed of various controls and I needed to modify the borders of those controls to suit my needs. Attached is a sample project that has the modified control template if anyone is interested.

----------


## chris128

Nice  :Smilie:

----------


## RobDog888

Subscribed

----------


## decuser

Hi dee-u,
Attached project that helps a lot for the rounded combobox
Do you have all other controls template
if yes please attach only the control templates..i just wanted to explore all this

Thanks
decuser.

----------


## dee-u

> Hi dee-u,
> Attached project that helps a lot for the rounded combobox
> Do you have all other controls template
> if yes please attach only the control templates..i just wanted to explore all this
> 
> Thanks
> decuser.


You can try searching them in MSDN.  :Smilie:

----------


## decuser

Hi,

I am interested in control templates of the control available in the NetVerse screen.I searched MSDN couldn;t get the ones i wanted.
I saw your netverse screen and with you sample project i could see only combobox template not the other ones..i just need the button,textbox templates as available in the screen

kindly help me

thanks
decuser

----------


## RobDog888

All the rounded control templates are in the netverser project. This one is just for hte rounded combobox

----------


## RobDog888

Here is the link to the project in CodeBank
http://www.vbforums.com/showthread.p...18#post3631718

Check out the NetVerserStyles.xaml file  :Wink:

----------


## the1weasel

Great example!  I have one question: how is the gradient around the combobox controlled?  I've set almost every color to #FFF and nothing seems to change it.  Thanks for any help you can offer.

----------


## makanimanthan

can't find attachment  WpfApplication1.zip . Please upload again....

----------


## RobDog888

> can't find attachment  WpfApplication1.zip . Please upload again....


Its in post #3  :Wink:

----------

