Exemple #1
0
 public static Binder <TSource, UISwitch> Off <TSource, TPropertyType>(this Binder <TSource, UISwitch> binder, Expression <Func <TSource, TPropertyType> > property, IConverter <TPropertyType, bool> converter = null)
     where TSource : class
 {
     converter = converter ?? Transmuter.Default.GetConverter <TPropertyType, bool>();
     converter = new TypedConverter <TPropertyType, bool>(new ChainConverter(converter, invert));
     return(binder.Off(property, converter));
 }
Exemple #2
0
 public static Binder <TSource, UISwitch> Off <TSource, TPropertyType>(this Binder <TSource, UISwitch> binder, Expression <Func <TSource, TPropertyType> > property, IConverter <TPropertyType, bool> converter = null)
     where TSource : class
 {
     converter = converter ?? Converters.Default <TPropertyType, bool>();
     return(binder.Off(property, converter.Chain(Converters.Invert)));
 }