- self
- The Xamarin.Forms.BindableObject.
- targetProperty
- The BindableProperty on which to set a bindinge.
- path
- A string indicating the property path to bind to.
The following example shows how to use the extension method to set a binding.
C# Example
var label = new Label ();
label.SetBinding (Label.TextProperty, "Name");
label.BindingContext = new {Name = "John Doe", Company = "Xamarin"};
Debug.WriteLine (label.Text); //prints "John Doe"