protected virtual IBindingBuilder CreateBindingBuilder(object targetObject, string targetPath) { IBindingBuilder builder = BindingServiceProvider .BindingProvider .CreateBuildersFromString(targetObject, ToBindingExpression(targetPath))[0]; var syntaxBuilder = new SyntaxBuilder <object, object>(builder); SetMode(syntaxBuilder); SetUpdateSourceTrigger(syntaxBuilder); if (HasConverter) { syntaxBuilder.WithConverter(d => _converter); } if (HasConverterCulture) { syntaxBuilder.WithConverterCulture(d => ConverterCulture); } if (HasConverterParameter) { syntaxBuilder.WithConverterParameter(d => ConverterParameter); } if (HasFallback) { syntaxBuilder.WithFallback(d => Fallback); } if (HasCommandParameter) { syntaxBuilder.WithCommandParameter(d => CommandParameter); } if (ToggleEnabledState.HasValue) { syntaxBuilder.ToggleEnabledState(ToggleEnabledState.Value); } if (ValidatesOnExceptions) { syntaxBuilder.ValidatesOnExceptions(); } if (ValidatesOnNotifyDataErrors) { syntaxBuilder.ValidatesOnNotifyDataErrors(); } if (TargetNullValue != null) { syntaxBuilder.WithTargetNullValue(TargetNullValue); } if (Delay != 0) { syntaxBuilder.WithDelay(_delay, false); } if (TargetDelay != 0) { syntaxBuilder.WithDelay(_targetDelay, true); } if (HasDefaultValueOnException) { syntaxBuilder.DefaultValueOnException(DefaultValueOnException); } return(builder); }
protected virtual IBindingBuilder CreateBindingBuilder(object targetObject, string targetPath) { IBindingBuilder builder = BindingServiceProvider .BindingProvider .CreateBuildersFromString(targetObject, ToBindingExpression(targetPath))[0]; var syntaxBuilder = new SyntaxBuilder<object, object>(builder); SetMode(syntaxBuilder); SetUpdateSourceTrigger(syntaxBuilder); if (HasConverter) syntaxBuilder.WithConverter(d => _converter); if (HasConverterCulture) syntaxBuilder.WithConverterCulture(d => ConverterCulture); if (HasConverterParameter) syntaxBuilder.WithConverterParameter(d => ConverterParameter); if (HasFallback) syntaxBuilder.WithFallback(d => Fallback); if (HasCommandParameter) syntaxBuilder.WithCommandParameter(d => CommandParameter); if (ToggleEnabledState.HasValue) syntaxBuilder.ToggleEnabledState(ToggleEnabledState.Value); if (HasStablePath.HasValue) syntaxBuilder.HasStablePath(HasStablePath.Value); if (Observable.HasValue) syntaxBuilder.Observable(Observable.Value); if (Optional.HasValue) syntaxBuilder.Optional(Optional.Value); if (ValidatesOnExceptions) syntaxBuilder.ValidatesOnExceptions(); if (ValidatesOnNotifyDataErrors) syntaxBuilder.ValidatesOnNotifyDataErrors(); if (TargetNullValue != null) syntaxBuilder.WithTargetNullValue(TargetNullValue); if (Delay != 0) syntaxBuilder.WithDelay(_delay, false); if (TargetDelay != 0) syntaxBuilder.WithDelay(_targetDelay, true); if (HasDefaultValueOnException) syntaxBuilder.DefaultValueOnException(DefaultValueOnException); return builder; }