BindableObject.SetBinding(BindableProperty, BindingBase) 方法

定义

将绑定分配给可绑定属性。

public:
 void SetBinding(Microsoft::Maui::Controls::BindableProperty ^ targetProperty, Microsoft::Maui::Controls::BindingBase ^ binding);
public void SetBinding (Microsoft.Maui.Controls.BindableProperty targetProperty, Microsoft.Maui.Controls.BindingBase binding);
member this.SetBinding : Microsoft.Maui.Controls.BindableProperty * Microsoft.Maui.Controls.BindingBase -> unit
Public Sub SetBinding (targetProperty As BindableProperty, binding As BindingBase)

参数

targetProperty
BindableProperty

要对其应用 binding的可绑定属性。

binding
BindingBase

要为其 targetProperty设置的绑定。

适用于