List <T> and ObservableCollection <T> and observablecollection in WPF
When you bind a data source to a control in WPF, we recommend that you use the ObservableCollection <T> set for the data source.
ObservableCollection <T> class: indicates a dynamic data set. When an item is added, removed, or the entire list is refreshed, a notification is provided dynamically.
When the data source changes, the control content is also automatically modified. No need to rebind. List <T> is only the forced conversion result of an ObservableCollection <T>, and cannot dynamically provide notification of attribute change. The advantage of using ObservableCollection <T> as a data source is that the front-end code can be completely separated from the back-end code without having to know the control data source from the back-end. You can bind the front-end data source with your own bading. Use ObservableCollection <T> to import the namespace using System. Collections. ObjectModel;