public class MyDataModel { public string Name { get; set; } public int Age { get; set; } } public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); MyDataModel myData = new MyDataModel(); Binding myBinding = new Binding("Name"); myBinding.Source = myData; txtName.SetBinding(TextBlock.TextProperty, myBinding); } }In this example, a new instance of the MyDataModel class is created. The Binding class is then used to bind the Name property to the Text property of the TextBox control. This binding is then associated with the txtName TextBlock control using the SetBinding method. The System.Windows.Data Binding package library is part of the Framework Class Library that is included with the .NET framework.