public static Binder <TSource, TView> Visible <TSource, TView, TPropertyType>(this Binder <TSource, TView> binder, Expression <Func <TSource, TPropertyType> > property, IConverter <TPropertyType, bool> converter = null) where TSource : class where TView : View { converter = converter ?? Converters.Default <TPropertyType, bool>(); return(binder.Visibility(property, converter.Chain(PlatformConverters.BoolToViewState))); }
public static Binder <TSource, TView> Visible <TSource, TView, TPropertyType>(this Binder <TSource, TView> binder, Expression <Func <TSource, TPropertyType> > property, IConverter <TPropertyType, bool> converter = null) where TSource : class where TView : View { converter = converter ?? Transmuter.Default.GetConverter <TPropertyType, bool>(); var toState = Transmuter.Default.GetConverter <bool, ViewStates>(); var stateconverter = new TypedConverter <TPropertyType, ViewStates>(new ChainConverter(converter, toState)); return(binder.Visibility(property, stateconverter)); }