Exemplo n.º 1
0
        public void Clear()
        {
            IEnumerable <UIElement> lastChildren = children.ToArray();

            children.Clear();

            foreach (UIElement child in lastChildren)
            {
                ClearChildParent(child);
            }

            CollectionChanged.Raise(this, NotifyCollectionChangedEventArgs.RemoveRange(lastChildren, 0));
        }