C
C#2y 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
sibber2y ago
iterate over them and set the property?
Baymax
BaymaxOP2y ago
What property ?
hugeman
hugeman2y ago
The property or data that you want to edit
Baymax
BaymaxOP2y 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
sibber2y ago
you mean you want to replace them? looks like youd need to find each item and replace it manually
Mayor McCheese
mvvm ftw
nohopestage
nohopestage2y ago
You can iterate through it and edit the items I believe, so not sure you mean

Did you find this page helpful?