I am looking for the proper WPF control(s) to display a list of strings subject to the following constraints:
1. The user can edit the single item
2. There may be some "empty" items
3. The code must have access to the list content before and after the editing
Maybe a ListBox or a ListView. Despite spending many hours searching for documentation and examples I am not sure yet if and how to make the list items editable. I am a novice... sigh
Thank you in advance.

Sachin SinghRank #66 · 26.2K reputationPosted Feb 20, 2022, 12:51 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Feb 20, 2022, 6:25 AM EST
Rijwan AnsariRank #82 · 24.2K reputationPosted Feb 20, 2022, 7:18 AM EST
You can use datagrid control, which basically, an editable gridview.
Example:
Create a class that represents a row:
And set the ItemsSource property of the DataGrid to a collection of such objects:
XAML:
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Feb 20, 2022, 8:57 AM EST
Maura Monville43 reputationPosted Feb 20, 2022, 6:06 AM EST
This is an answer to Mr SACHIN SINGH.
Thank you for your complete solution.
Unluckily the C# compiler tells me "StringContainer does not implement interface INotifyPropertyChanged "
So I am pretty much stuck here.
Any suggestion?
Thanks
Satya KarkiRank #78 · 24.6K reputationPosted Feb 20, 2022, 8:23 AM EST