public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) { return(null); } ShowHideAnimateType type = (ShowHideAnimateType)value; int param = int.Parse(parameter.ToString()); switch (param) { case 0: return(ShowHideAnimateType.None == type); case 1: return(ShowHideAnimateType.Fade == type); case 2: return(ShowHideAnimateType.SlideRight == type); case 3: return(ShowHideAnimateType.SlideLeft == type); case 4: return(ShowHideAnimateType.SlideUp == type); case 5: return(ShowHideAnimateType.SlideDown == type); default: return(false); } }
public void SetAllAnimateType(ShowHideAnimateType type) { foreach (ShowHideActionTarget target in _targetObjects.Values) { target.AnimateType = type; } }