title: Is there a list that is sorted automatically in .NET?
body: <p>I have a collection of <code>Layers</code> where they have names and colors. What I want to do is to sort these first based on colors, then based on their names:</p>
  
  <pre><code>class Layer
  {
      public string Name {get; set;}
      public LayerColor Color {get; set;}
  }
  
  enum LayerColor
  {
      Red,
      Blue,
      Green
  }
  </code></pre>
  
  <p>Like:</p>
  
  <pre><code>(red) layer2
  (red) layer7
  (blue) layer0
  (blue) layer3
  ...
  </code></pre>
  
  <p>I was looking at SortedList but that acts like a Dictionary so doesn't allow for duplicate items.</p>
  
  <p>Also I am using an API where I get the list of <code>Layers</code> by creation order, so I need to get the full list of <code>Layers</code> to sort them the way I want.</p>
  
  <p>Eventually the list of <code>Layers</code> will be binded to a WPF UI where the users will have the ability to add new Layers, so that's why I wanted the internal list to always be sorted as the performance is not important (the number of <code>Layers</code> are less than a thousand).</p>
  
  <p>In the end the <code>Layers</code> I sorted will be accessed via something like this:</p>
  
  <pre><code>class Image
  {
      public MySortedList&lt;Layer&gt; Layers {get; set;}
  }
  </code></pre>
  
  <p>What's the best way to do this?</p>