SuperMap.WindowsPhone.Core.FeatureElement.OnPathGeometryPropertyChanged C# (CSharp) Method

OnPathGeometryPropertyChanged() private static method

private static OnPathGeometryPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void
        private static void OnPathGeometryPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FeatureElement element = d as FeatureElement;
            if (element != null)
            {
                FrameworkElement pathChild = element.GetPathChild();
                if ((pathChild is Path) && (e.NewValue != null))
                {
                    ((Path)pathChild).Data = e.NewValue as System.Windows.Media.Geometry;
                }
                else if ((pathChild != null) && (e.NewValue != null))
                {
                    pathChild.Clip = e.NewValue as System.Windows.Media.Geometry;
                }
            }
        }