+ 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.
2 ответов
+ 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
+ 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