I'm looking to have a combo box with only two items:
-----------
| Other.. |
------------
| TextBox |
------------
Text Box representing a physical textbox that can be editable and Other..
being just a regular combobox item.
Can someone help me out on how I will need to edit it.
I have tried changing the Combbox.itemtemplate with a stackpanel and then adding a textbox, but it didn't show up and that also stops the chance of me having a regular combobox item in the control.
Thanks in advance.
Have you tried setting ComboBox.IsEditable = true
? Then you'll need just one item and the ComboBox.Text
property.
Not quite sure what the problem is, have you tried this:
<ComboBox>
<ComboBoxItem>Other</ComboBoxItem>
<TextBox>TextBox</TextBox>
</ComboBox>
If this is not what you want, please explain what exactly you need...
(The TextBox-item might be quite hard to select so giving it a label which can be clicked might be of interest)
<ComboBox>
<ComboBoxItem>Normal Item</ComboBoxItem>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Other: " VerticalAlignment="Center"/>
<TextBox>Enter text...</TextBox>
</StackPanel>
</ComboBox>
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