protected string ToAnimationTypeString(HeroDefaultAnimationType type, HeroAnimationDirection dir) { string dirString = null; switch (dir) { case HeroAnimationDirection.Down: dirString = "down"; break; case HeroAnimationDirection.Up: dirString = "up"; break; case HeroAnimationDirection.Left: dirString = "left"; break; case HeroAnimationDirection.Right: dirString = "right"; break; } switch (type) { case HeroDefaultAnimationType.Auto: return("auto"); case HeroDefaultAnimationType.Cover: return($"cover({dirString})"); case HeroDefaultAnimationType.Fade: return("fade"); case HeroDefaultAnimationType.None: return("none"); case HeroDefaultAnimationType.PageIn: return($"pageIn({dirString})"); case HeroDefaultAnimationType.PageOut: return($"pageOut({dirString})"); case HeroDefaultAnimationType.Pull: return($"pull({dirString})"); case HeroDefaultAnimationType.Push: return($"push({dirString})"); case HeroDefaultAnimationType.Slide: return($"slide({dirString})"); case HeroDefaultAnimationType.Uncover: return($"uncover({dirString})"); case HeroDefaultAnimationType.Zoom: return("zoom"); case HeroDefaultAnimationType.ZoomOut: return("zoomOut"); case HeroDefaultAnimationType.ZoomSlide: return($"zoomSlide({dirString})"); default: return("auto"); } }
public void SetModalAnimation(HeroDefaultAnimationType type, HeroAnimationDirection dir = HeroAnimationDirection.Default) { this.ModalAnimationString = ToAnimationTypeString(type, dir); }