Hi Experts,
I am unable to locate a property similar to WindowsForm "DropDownWidth" Property for the Combo Box in WPF. Is there a work around to achieve this functionality?
Please help! Thanks in advance.
Regards,
Samar
Hi Experts,
I am unable to locate a property similar to WindowsForm "DropDownWidth" Property for the Combo Box in WPF. Is there a work around to achieve this functionality?
Please help! Thanks in advance.
Regards,
Samar
use the value like....
<ComboBox Width="85" Height="21.96" />
That will set the size of the box won't it?
Edited & corrected a mistake!
I don't remember if there is such property in a combobox, but you always can alter a default control template. In your case you should specify a width property of a popup element in a control template. Here is a sample code, taken from one of the WPF themes from Codeplex:
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
...
<Popup ... Width="100" >
...
</ControlTemplate>
This is a general idea. You can look in a themes source code fore more information. This MSDN pages can also be helpful: