点击或拖拽改变大小

AttachedPropertiesAddValue, S, T 方法 (AttachedValue, Value, String, CpfObject, BindingMode, FuncS, T, FuncT, S, ActionBinding, Object, Exception, ActionBinding, Object, Exception)

设置附加属性值和绑定

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

参数

attached
类型:CPFAttachedValue

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="attached"/> 文档]

value
类型:Value

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="value"/> 文档]

sourcePropertyName
类型:SystemString

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="sourcePropertyName"/> 文档]

source
类型:CPFCpfObject

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="source"/> 文档]

bindingMode (Optional)
类型:CPFBindingMode

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="bindingMode"/> 文档]

convert (Optional)
类型:SystemFuncS, T

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="convert"/> 文档]

convertBack (Optional)
类型:SystemFuncT, S

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="convertBack"/> 文档]

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

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},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.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <param name="TargetToSourceError"/> 文档]

类型参数

Value

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <typeparam name="Value"/> 文档]

S

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <typeparam name="S"/> 文档]

T

[缺少 "M:CPF.AttachedProperties.Add``3(CPF.Attached{``0},``0,System.String,CPF.CpfObject,CPF.BindingMode,System.Func{``1,``2},System.Func{``2,``1},System.Action{CPF.Binding,System.Object,System.Exception},System.Action{CPF.Binding,System.Object,System.Exception})" 的 <typeparam name="T"/> 文档]

参见