点击或拖拽改变大小

BindingsAdd 方法 (String, String, Object, BindingMode, FuncObject, Object, FuncObject, Object, ActionBinding, Object, Exception, ActionBinding, Object, Exception)

添加绑定

命名空间:  CPF
程序集:  CPF (在 CPF.dll 中) 版本:0.8.8.5
语法
C#
public Binding Add(
	string propertyName,
	string sourcePropertyName,
	Object source = null,
	BindingMode bindingMode = BindingMode.OneWay,
	Func<Object, Object> convert = null,
	Func<Object, Object> convertBack = null,
	Action<Binding, Object, Exception> SourceToTargetError = null,
	Action<Binding, Object, Exception> TargetToSourceError = null
)

参数

propertyName
类型:SystemString
绑定的目标属性名
sourcePropertyName
类型:SystemString
绑定的数据源对象的属性名
source (Optional)
类型:SystemObject
数据源对象,如果为空则绑定到DataContext对象上
bindingMode (Optional)
类型:CPFBindingMode
绑定模式
convert (Optional)
类型:SystemFuncObject, Object
源到目标数据转换
convertBack (Optional)
类型:SystemFuncObject, Object
目标到源数据转换
SourceToTargetError (Optional)
类型:SystemActionBinding, Object, Exception

[缺少 "M:CPF.Bindings.Add(System.String,System.String,System.Object,CPF.BindingMode,System.Func{System.Object,System.Object},System.Func{System.Object,System.Object},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="SourceToTargetError"/> 文档]

TargetToSourceError (Optional)
类型:SystemActionBinding, Object, Exception

[缺少 "M:CPF.Bindings.Add(System.String,System.String,System.Object,CPF.BindingMode,System.Func{System.Object,System.Object},System.Func{System.Object,System.Object},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="TargetToSourceError"/> 文档]

返回值

类型:Binding

[缺少 "M:CPF.Bindings.Add(System.String,System.String,System.Object,CPF.BindingMode,System.Func{System.Object,System.Object},System.Func{System.Object,System.Object},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <returns> 文档]

参见