共用方式為


DataTemplate.SetBinding(BindableProperty, BindingBase) 方法

定義

設定 property 的繫結。

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

參數

property
BindableProperty

要繫結的目標屬性。

binding
BindingBase

要使用的繫結。

適用於