title: Saving ObservableCollection to file (.txt)
body: <p>Whats the best way for me to save an observableCollection of data that I have displayed in a listview to a file(.txt). I had it working when I didnt have the observableCollection and the binding data shown below, for this i simply used a string builder. From the code below how can i save the "Process name"</p>
  
  <p>XAML code </p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ListView Height="146"  ScrollBar.Scroll="listView1_Scroll" ItemsSource="{Binding StatisticsCollection}"&gt;   &lt;ListView.View&gt;
     &lt;GridView &gt;
        &lt;GridViewColumn Header="Process Name" Width="80" DisplayMemberBinding="{Binding ProcessName}" /&gt;
     &lt;/GridView&gt;
  &lt;/Listview.View&gt;
  </code></pre>
  
  <p>Stringbuilder that use to work</p>
  
  <pre><code>System.Text.StringBuilder sb = new System.Text.StringBuilder();
  foreach (object item in listView1.Items)
  {
      sb.AppendLine(item.ToString());
  }
  </code></pre>
  
  <p>Declaration</p>
  
  <pre><code> ObservableCollection&lt;StatisticsData&gt; _StatisticsCollection =
      new ObservableCollection&lt;StatisticsData&gt;();
  
      public ObservableCollection&lt;StatisticsData&gt; StatisticsCollection
      {
          get { return _StatisticsCollection; }
      }
  </code></pre>
  
  <p>Any feedback would be great,</p>
  
  <p>Thanks</p>
  
  <p>Martin</p>