I tried to show the list in Listbox by data binding. Here is my code.
[Serializable] public class RecordItem : INotifyPropertyChanged {
It works very well in principle, but when I use data binding
this.lbData.ItemsSource = myRecents;
and try to serialize
this.myRecents.Serialize(recentsPath);
he does not cope with this error:
Enter "System.ComponentModel.PropertyChangedEventManager" in the assembly "WpfApplication1, Version = 3.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" is not marked as serializable.
How can I handle this?
ps. I do not want to serialize the PropertyChangedEvent handler. I want to flag the [NonSerializable] attribute, but I don't know how to do this.
serialization wpf
mjk6026
source share