共用方式為


TemplateExtensions.SetBinding(DataTemplate, BindableProperty, String) 方法

定義

self 物件的 targetProperty 繫結至使用 path 建立的新 Binding 執行個體。

public:
[System::Runtime::CompilerServices::Extension]
 static void SetBinding(Microsoft::Maui::Controls::DataTemplate ^ self, Microsoft::Maui::Controls::BindableProperty ^ targetProperty, System::String ^ path);
public static void SetBinding (this Microsoft.Maui.Controls.DataTemplate self, Microsoft.Maui.Controls.BindableProperty targetProperty, string path);
static member SetBinding : Microsoft.Maui.Controls.DataTemplate * Microsoft.Maui.Controls.BindableProperty * string -> unit
<Extension()>
Public Sub SetBinding (self As DataTemplate, targetProperty As BindableProperty, path As String)

參數

self
DataTemplate

要在其上執行此方法的範本。

targetProperty
BindableProperty

繫結的目標屬性。

path
String

繫結的路徑。

適用於