public Bind <TBinding> WithConverter <TSource>(
            Expression <Func <TBinding, TSource> > member,
            SourceToControlConverter <TSource, TProperty> converter)
        {
            var propertyName = ReflectionUtils.GetPropertyName(_controlProperty);
            var dataMember   = ReflectionUtils.GetFullPath(member);
            var binding      = new ConversionBinding <TSource, TProperty>(propertyName, _item, dataMember, converter);

            _control.DataBindings.Add(binding);
            return(this);
        }
Example #2
0
 public Bind <TBinding> For <TControl, TProperty>(TControl control, Expression <Func <TControl, TProperty> > controlProperty, Expression <Func <TBinding, TProperty> > member)
     where TControl : Control
 {
     control.DataBindings.Add(ReflectionUtils.GetPropertyName(controlProperty), _item, ReflectionUtils.GetFullPath(member));
     return(this);
 }