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;
}
}
}