Link From( T obj, string targetName )
Link From( System.Func<T> read, System.Action<T> write )
Link From( System.Object sourceObject, System.Func<T> read, System.Action<T> write )
Link From( Proxy source )

book_4_sparkGenerated
code_blocksInput

Description

The From method in the Sandbox.Bind.Builder class is used to create a binding from a specified object and its property to another target. This method is part of the binding system that allows you to link properties between objects, enabling automatic updates when the source property changes.

Usage

To use the From method, you need to provide an object of type T and a PropertyInfo object representing the property you want to bind from. This method returns a Sandbox.Bind.Link which represents the established link between the source and target properties.

Example

// Example of using the From method
var builder = new Sandbox.Bind.Builder();
var sourceObject = new MyClass();
var targetProperty = typeof(MyClass).GetProperty("TargetProperty");

// Create a binding from sourceObject's property to the targetProperty
Sandbox.Bind.Link link = builder.From(sourceObject, targetProperty);