Why is CollectionChanged doubled on BindableApplicationBar?

Oct 17, 2012 at 12:05 PM

In constructor of BindableApplicationBar class you have:

 this.Buttons.CollectionChanged +=
                this.ButtonsCollectionChanged;

In Buttons propertychange call tree you have:
if (newButtons != null)
            {
                newButtons.CollectionChanged += this.ButtonsCollectionChanged;
            }

Is there any reason to call the ButtonsCollectionChanged twice?
It seems to me that calling Detach() twice will cause an null ref exception to be thrown in:

public void Detach()
        {
this.applicationBarIconButton.Click -=...