none
Serialize a binded ObservableCollection (with BinaryFormatter)??

    Question

  • Hi!

    Do you know why I can't serialize a binded ObservableCollection with BinaryFormatter??

    I tried with xml-serialization and it works fine! But with BinaryFormatter, I have following error:

    Code Block

    [1616] Type 'System.Windows.Data.ListCollectionView' in Assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.


    And when I remove the "OnPropertyChanged" of my ObservableCollection property, it works....

    You can download a test-project here : http://bastien.duotone.ch/SerializeObservableCollection.zip

    --> commented code works fine ;-) (with xml-serialization!)

    Thx for help!

    @++
    Monday, October 15, 2007 2:11 PM

All replies