title: Sorting ObservableCollection Using Custom Logic
body: <p>New to <code>WPF</code> and also the <code>ObservableCollection</code> I need to sort it in my own way, and keep it sorted everytime something adds or removes from it.</p>
  
  <pre><code>ObservableCollection&lt;User&gt; users = new ObservableCollection&lt;User&gt;();
  </code></pre>
  
  <p>The user object is like so :</p>
  
  <pre><code>class User
  {
      public string Name { get; set; }
      public bool IsOp { get; set; }
      public bool IsAway { get; set; }
  }
  </code></pre>
  
  <p>I would like all the <code>IsOp's</code> at the top of the list, in alphabetical order. Then all the non-ops in alphabetical order following them.</p>
  
  <p>What is the correct way to achieve this?</p>
  
  <p>Many thanks in advance.</p>