SuperMap.WindowsPhone.Core.Feature.OnVisibilityPropertyChanged C# (CSharp) Method

OnVisibilityPropertyChanged() private static method

private static OnVisibilityPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void
        private static void OnVisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FeatureElement elementReference = (d as Feature).GetElementReference();
            if (elementReference != null)
            {
                elementReference.Visibility = (Visibility)e.NewValue;
                if (elementReference.Visibility == Visibility.Visible)
                {
                    elementReference.SetPath();
                }
            }
        }