--- title: "How to: Get the Binding Object from a Bound Target Property" ms.date: "03/30/2017" helpviewer_keywords: - "data binding [WPF], getting binding objects from bound target properties" - "properties [WPF], getting binding objects from" ms.assetid: 87974c5f-136b-4de7-b07d-9285b62ab123 --- # How to: Get the Binding Object from a Bound Target Property This example shows how to obtain the binding object from a data-bound target property. ## Example You can do the following to get the object: [!code-csharp[BindValidation#GetBinding](~/samples/snippets/csharp/VS_Snippets_Wpf/BindValidation/CSharp/Window1.xaml.cs#getbinding)] > [!NOTE] > You must specify the dependency property for the binding you want because it is possible that more than one property of the target object is using data binding. Alternatively, you can get the and then get the value of the property. For the complete example see [Binding Validation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/BindValidation). > [!NOTE] > If your binding is a , use . If it is a , use . If you are uncertain whether the target property is bound using a , a , or a , you can use . ## See also - [Create a Binding in Code](how-to-create-a-binding-in-code.md) - [How-to Topics](data-binding-how-to-topics.md)