Tutorial: Using LiveBinding Programatically
Go Up to Database and LiveBindings Tutorials
This tutorial shows how to use LiveBinding programatically, to manually create binding expressions and to bind properties of objects together.
- Caution: The programmatic method described here is NOT the standard way to implement binding expressions. Typically, you would use the Object Inspector (the standard method) in a VCL or a FMX application. You might never need to use the programmatic way of creating binding expressions. This tutorial demonstrates, however, that it is possible to manually create such expressions.
- For examples of using LiveBindings in the standard way, see Tutorial: Using LiveBinding in VCL Applications and Tutorial: Using LiveBinding to Create a FireMonkey Application Without Code.
In this tutorial, you create a Console application that uses LiveBindings without any visual components. The console application has two objects with different properties bound to each other that display different behaviors.
- Creating the Application and Defining the Uses Clause
- Defining and Implementing the Bindable Objects
- Programatically Binding Created Objects
- The Entire Project and Observing the Results