title: How can I make a read-only ObservableCollection property?
body: <p>I'd like to expose a property on a view model that contains a list of objects (from database).</p>
  
  <p>I need this collection to be read-only.  That is, I want to prevent Add/Remove, etc.  But allow the foreach and indexers to work.  My intent is to declare a private field holding the editable collection and reference it with a read-only Public Property. As follows</p>
  
  <pre><code>public ObservableCollection&lt;foo&gt; CollectionOfFoo { 
       get { 
           return _CollectionOfFoo;
       }
  }
  </code></pre>
  
  <p>However, that syntax just prevents changing the reference to the collection.  It doesn't prevent add/remove, etc.</p>
  
  <p>What is the right way to accomplish this?</p>