private static void OnTiltIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (d is FrameworkElement element)
            {
                var oldEffect = (TiltEffect2D)d.GetValue(TiltEffectProperty);

                if (e.OldValue is true)
                {
                    oldEffect.Disable();
                    d.ClearValue(TiltEffectProperty);
                }

                if (e.NewValue is true)
                {
                    var newEffect = new TiltEffect2D(element);
                    d.SetValue(TiltEffectProperty, newEffect);
                    newEffect.Enable();
                }
            }
        }
 /// <summary>
 /// 设置倾斜效果,设置此属性为非 null 会自动打开此元素的倾斜效果。
 /// </summary>
 public static void SetTiltEffect(DependencyObject element, TiltEffect2D value)
 {
     element.SetValue(IsEnabledProperty, value);
 }