Why is CollectionChanged doubled on BindableApplicationBar?

Oct 17, 2012 at 11:05 AM

In constructor of BindableApplicationBar class you have:

 this.Buttons.CollectionChanged +=

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 -=...