SuperMap.WinRT.Mapping.ElementsLayer.children_CollectionChanged C# (CSharp) Method

children_CollectionChanged() private method

private children_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
sender object
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
return void
        private void children_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (e.Action == NotifyCollectionChangedAction.Add)
            {
                if (!Rectangle2D.IsNullOrEmpty(this.fullBounds))
                {
                    UpdateFullBounds(e.NewItems);
                }
            }
            else
            {
                if (e.Action == NotifyCollectionChangedAction.Reset)
                {
                    base.Container.Children.Clear();
                }
                else
                {
                    base.Container.Children.Remove(e.OldItems[0] as UIElement);
                }
                this.fullBounds = Rectangle2D.Empty;
            }
            this.Invalidate();

        }