C
C#13mo ago
Baymax

[WPF] How to edit multiple items in ListBox at once

I'm trying to edit multiple items using SelectionMode="Extended" to give the items a specific value, I'm using SelectedItems property to get the items, just don't know how to save it back to the ListBox after edit.
7 Replies
sibber
sibber13mo ago
iterate over them and set the property?
Baymax
BaymaxOP13mo ago
What property ?
bighugemassive3
bighugemassive313mo ago
The property or data that you want to edit
Baymax
BaymaxOP13mo ago
I want to edit the selected ListBox items themselves, SelectedItems is a read-only property (unlike SelectedItem), so iterating through it won't work as with SelectedItem property.
sibber
sibber13mo ago
you mean you want to replace them? looks like youd need to find each item and replace it manually
Mayor McCheese
Mayor McCheese13mo ago
mvvm ftw
nohopestage
nohopestage13mo ago
You can iterate through it and edit the items I believe, so not sure you mean

Did you find this page helpful?