c# - WPF AutoComplete TextBox binding allow value that is not in the source list -


currently struggling wpf autocomplete textbox, part of extended toolkit. using autocomplete textbox in property grid :

public class customvalueeditor : xceed.wpf.toolkit.propertygrid.editors.itypeeditor {     public frameworkelement resolveeditor(propertyitem propertyitem)     {         system.windows.controls.autocompletebox autotextbox = new system.windows.controls.autocompletebox();          var _binding = new binding("value") //bind value property of propertyitem         {             source = propertyitem,             validatesonexceptions = true,             validatesondataerrors = true,             mode = propertyitem.isreadonly ? bindingmode.oneway : bindingmode.twoway         };          bindingoperations.setbinding(autotextbox, system.windows.controls.autocompletebox.selecteditemproperty, _binding);          autotextbox.itemssource = staticcustomclass.getvalues();                      return autotextbox;     } } 

and editor property :

    private string _value = "";     [datamember]     [displayname("value")]     [category("definition")]     [editor(typeof(customvalueeditor),typeof(customvalueeditor))]     public string value { => _value; set { _value = value;  raisepropertychanged("value");} 

my problem that, when enter text not staticcustomclass.getvalues() - property not set. want autocomplete textbox suggest input, allow input free text. can please me direction on how solve this? or maybe there workaround autocomplete textbox disable 'validation' ?

thanks in advance!


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - VueJS2 and the Window Object - how to use? -