WPF: Most efficient way to remove the last item from a bound list?
<p>In a WPF application, I've a list of object. </p>

<p>We will add a lot of element inside this list regularly(~1-10 items/seconds).</p>

<p>We want to add a "capacity" to this list, in order that when we reach this capacity, we remove the "oldest" item added.</p>

<p>This list will be bound to a WPF UserControl, so it needs to be <code>ObservableCollection</code> or similar.</p>

<p>But, my understanding is that a <code>Collection</code> doesn't garantee the order, so I cannot do the following:</p>

<pre><code>int nbOfElementsToRemove = EventsList.Count - MAX_EVENTS;
if (nbOfElementsToRemove &gt; 0)
{
    LoggingEvent[] loggingEvents = EventsList.Take(nbOfElementsToRemove).ToArray();
    foreach (LoggingEvent loggingEvent in loggingEvents)
    {
        EventsList.Remove(loggingEvent);
    }
}
</code></pre>

<p>Because I will maybe not get the oldest items.</p>

<p>So what is the most efficient way of removing the oldest item(s) of a list that has to be bound to a WPF usercontrol?</p>