If you ever get the error “PropertyChangedEventManager is not marked as serializable.” This is probably because you are implementing INotifiyPropertyChanged incorrectly.
The solution is to mark your PropertyChangedEventManager as NonSerialized.
#region INotifyPropertyChanged Members
[field: NonSerialized]
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, e);
}
}
#endregion
Thanks, this fixed the problem I had. (Including one I didn't even attribute to this scenario.)
ReplyDeletethx
ReplyDeleteThanks man. It was obvious when I read it, but I was going to take a lot longer to get there!
ReplyDelete