I have added a ComboBox in a UWP app that I am working on for Windows 10 and I am not able to make it so that users can type in free text if the value they need on it doesn't match any of the values available to select.
How can I do this?
According to MSDN, the description for ComboBox.IsEditable
is:
Gets or sets a value that enables or disables editing of the text in text box of the ComboBox.
Which seems to be what is needed. However, this seems to be only for WPF.
It does not seem to have a settable IsEditable
property on XAML:
On the code behind, when I try to access this property, it shows that the property only has get
and that it always returns false
:
Please let me know how I could make this possible. Thank you!
I have not tried yet but here is an implementation of ComboBox with editable textbox on UWP.
ComboBox with Editable Textbox
And, basically, Autosuggest option is totally different one from editable ComboBox - Autosuggest just suggest the candidate from the current item list, but not accept to entering the new one. To implement it, you need to implement the custom user control like the above guy.
Added Oct 2018 - From Windows 10 October 2018 Update, ComboBox now have the IsEditable property. Wao! Not well-documented yet but this blog post is helpful.
XAML ComboBox IsEditable and Text Properties
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