title: Is there a way to get XmlSerializer (or DataContractSerializer) to serialise the property of an observable object?
body: <p>When I run the xmlserializer on my class, it does not output the property I have specified for my nested observable collection. I have made sure it is public and have ensured it has a setter but it just isn't getting serialised.</p>
  
  <p>Running the xmlserializer produces this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ArrayOfArrayOfNote&gt;
    &lt;ArrayOfNote&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
    &lt;ArrayOfNote&gt;
    &lt;ArrayOfNote&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
    &lt;ArrayOfNote&gt;
  &lt;/ArrayOfArrayOfNote&gt;
  </code></pre>
  
  <p>When I am expecting it to produce something like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ArrayOfArrayOfNote&gt;
    &lt;ArrayOfNote&gt;
      &lt;Title&gt;SomeTitle&lt;/Title&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
    &lt;ArrayOfNote&gt;
    &lt;ArrayOfNote&gt;
      &lt;Title&gt;SomeTitle&lt;/Title&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
      &lt;Note&gt;
       (Many Properties of Note)
      &lt;/Note&gt;
    &lt;ArrayOfNote&gt;
  &lt;/ArrayOfArrayOfNote&gt;
  </code></pre>
  
  <p>This is the code I am using for the xmlserializer (which I believe isn't the problem)</p>
  
  <pre class="lang-cs prettyprint-override"><code>XmlSerializer serialiser = new XmlSerializer(typeof(NoteBookList));
  TextWriter writer = new StreamWriter(@"Notes.xml");
  serialiser.Serialize(writer, modules);
  writer.Close();
  </code></pre>
  
  <p>This is the class that is not serialized as I am expecting</p>
  
  <pre class="lang-cs prettyprint-override"><code>
  [Serializable]
  public class NoteBook : ObservableCollection&lt;Note&gt;
  {
      public NoteBook()
      {
  
      }
      public NoteBook(string title)
      {
          Title = title;
      }
      public string Title { get; set; }
  }
  
  </code></pre>
  
  <p>Thanks!</p>