SuperMap.WindowsPhone.Core.ShapeElement.Point2Ds_Changed C# (CSharp) Method

Point2Ds_Changed() private static method

private static Point2Ds_Changed ( DependencyObject o, DependencyPropertyChangedEventArgs e ) : void
o DependencyObject
e DependencyPropertyChangedEventArgs
return void
        private static void Point2Ds_Changed(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ShapeElement sb = o as ShapeElement;
            if (sb != null)
            {
                Point2DCollection oldValue = e.OldValue as Point2DCollection;
                if (oldValue != null)
                {
                    oldValue.CollectionChanged -= new NotifyCollectionChangedEventHandler(sb.Point2Ds_CollectionChanged);
                }
                Point2DCollection newValue = e.NewValue as Point2DCollection;
                if (newValue != null)
                {
                    newValue.CollectionChanged += new NotifyCollectionChangedEventHandler(sb.Point2Ds_CollectionChanged);
                }
                sb.ScreenUpdated();
            }
        }
        private void Point2Ds_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)