protected override ConversionResult <object> ConvertBack(ViewStates value, Type targetType, object parameter, CultureInfo culture) { switch (targetType) { case Type boolType when boolType == typeof(bool): return(ConversionResult <object> .SetValue(value == ViewStates.Invisible)); case Type intType when intType == typeof(int): return(ConversionResult <object> .SetValue(value == ViewStates.Invisible? 1 : 0)); case Type floatType when floatType == typeof(float): return(ConversionResult <object> .SetValue(value == ViewStates.Invisible? 1 : 0)); case Type doubleType when doubleType == typeof(double): return(ConversionResult <object> .SetValue(value == ViewStates.Invisible? 1 : 0)); default: return(ConversionResult <object> .UnsetValue()); } }
protected virtual ConversionResult <TSourceValue> ConvertBack([CanBeNull] TTargetValue value, [NotNull] Type targetType, [CanBeNull] object parameter, [NotNull] CultureInfo culture) { return(ConversionResult <TSourceValue> .UnsetValue()); }