BindableObject.SetBinding(BindableProperty, BindingBase) BindableObject.SetBinding(BindableProperty, BindingBase) Method

정의

속성에 바인딩을 할당합니다.Assigns a binding to a property.

public void SetBinding (Xamarin.Forms.BindableProperty targetProperty, Xamarin.Forms.BindingBase binding);
member this.SetBinding : Xamarin.Forms.BindableProperty * Xamarin.Forms.BindingBase -> unit

매개 변수

targetProperty
BindableProperty BindableProperty

바인딩을 설정할 BindableProperty입니다.The BindableProperty on which to set a binding.

binding
BindingBase BindingBase

설정할 바인딩입니다.The binding to set.

설명

다음 예제에서는 바인딩 속성을 설정 하는 방법을 보여 줍니다.The following example shows how to set a binding to a property:


var label = new Label ();
label.SetBinding (Label.TextProperty, new Binding ("Name"));

적용 대상