public override void RemoveAt(int index)
{
if (_isItemsHost)
base.RemoveAt(index);
else
{
VerifyWriteAccess();
// Get the element to be removed
UIElement element = this[index];
// Remove it from the external collection
_externalChildren.RemoveAt(index);
// Instruct the visual parent it must measure with the change in state
_visualParent.InvalidateMeasure();
// Actual elements are removed from internal collection once removed animation completes
OnUIElementsRemove(new UIElementsEventArgs(element));
}
}