// instant public static void AutoAlphaTo(this UIElement obj, double alpha) { ArtefactAnimator.StopEase(obj, new string[] { AnimationTypes.Alpha, AnimationTypes.AutoAlpha, AnimationTypes.AutoAlphaCollapsed }); obj.Opacity = alpha; #if !SILVERLIGHT obj.Visibility = alpha > 0 ? Visibility.Visible : Visibility.Hidden; #endif #if SILVERLIGHT obj.Visibility = alpha > 0 ? Visibility.Visible : Visibility.Collapsed; #endif }
// instant public static void AutoAlphaCollapsedTo(this UIElement obj, double alpha) { ArtefactAnimator.StopEase(obj, new string[] { AnimationTypes.Alpha, AnimationTypes.AutoAlpha, AnimationTypes.AutoAlphaCollapsed }); obj.Opacity = alpha; obj.Visibility = alpha > 0 ? Visibility.Visible : Visibility.Collapsed; }
public static EaseObject AutoAlphaCollapsedTo(this UIElement obj, double alpha, double time, PercentHandler transition, double delay) { ArtefactAnimator.StopEase(obj, new string[] { AnimationTypes.Alpha, AnimationTypes.AutoAlpha, AnimationTypes.AutoAlphaCollapsed }); return(ArtefactAnimator.AddEase(obj, AnimationTypes.AutoAlphaCollapsed, alpha, time, transition, delay)); }