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

绑定的路径。

适用于