Simple question how do you do this http://www.silverlightshow.net/Storage/demos/ComboBoxDemo/ComboBoxDemo.html in WPF using c#
To make the text portion of a ComboBox non-editable, set the DropDownStyle property to "DropDownList". The ComboBox is now essentially select-only for the user. You can do this in the Visual Studio designer, or in C# like this: stateComboBox.
Right-click the combo box and pick Format Control. Input range: Type the range of cells containing the list of items. Cell link: The combo box can be linked to a cell where the item number is displayed when you select an item from the list. Type the cell number where you want the item number displayed.
To bind a ComboBox or ListBox control If you are binding to a table, set the DisplayMember property to the name of a column in the data source. If you are binding to an IList, set the display member to a public property of the type in the list.
There's a property in WPF ComboBoxes called IsEditable
, if you enable this, it effectively becomes a TextBox with the dropdown of a normal ComboBox. I think this is what you're looking for.
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