+ 2

Can wpf-listbox be used to get user-input?

I have a listbox in wpf. I want the user to put data into this listbox. How can I do this? The wpf listbox seems to be pretty read only. A textbox can only add one item each time.

24th Oct 2021, 4:35 PM
sneeze
sneeze - avatar
2 Réponses
+ 2
From what I've seen its only read only. But if you connected a textbox to it then just hook that up to add the values into the listbox that would work
18th Nov 2021, 8:55 PM
C0D3 Crafter
+ 1
That is it. Comming from winform, I wanted to use a listbox for multiple input-items. In WPF. I need to use textbox. set VerticalScrollBarVisibility="True" AcceptsReturn="True" Than you can copy and paste items to there. This is a already build-in feature. No need to catch key-strokes. https://wpf.2000things.com/tag/acceptsreturn/ Thanks
12th Dec 2021, 8:07 PM
sneeze
sneeze - avatar