Click or drag to resize

BindingPropertyTValue Method (String)

Creates a new indirect property binding using the specified propertyName.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public static IndirectBinding<TValue> Property<TValue>(
	string propertyName
)

Parameters

propertyName
Type: SystemString
Name of the property to bind to.

Type Parameters

TValue
The type of the property.

Return Value

Type: IndirectBindingTValue

[Missing <returns> documentation for "M:Eto.Forms.Binding.Property``1(System.String)"]

Remarks
This supports single and multiple levels of property accessors in the model.
Examples
Use this like so:
public class MyChild { public SomeChildProperty { get; set; } }
public class MyModel { 
    public ChildObject { get; set; } 
    public int IntProperty { get; set; } 
}

// direct property binding
Binding.Property("IntProperty");

// bind to a property of a child object of the view model
Binding.Property("ChildObject.SomeChildProperty");
See Also