Binding Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Defines a binding that connects the properties of binding targets and data sources.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
The Binding type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Binding() | Initializes a new instance of the Binding class. |
![]() | Binding(String) | Initializes a new instance of the Binding class with an initial property path for the data source. |
| Name | Description | |
|---|---|---|
![]() | BindsDirectlyToSource | Gets or sets a value that indicates whether the binding ignores any ICollectionView settings on the data source. |
![]() | Converter | Gets or sets the converter object that is called by the binding engine to modify the data as it is passed between the source and target, or vice versa. |
![]() | ConverterCulture | Gets or sets the culture to be used by the Converter. |
![]() | ConverterParameter | Gets or sets a parameter that can be used in the Converter logic. |
![]() | ElementName | Gets or sets the name of the element to use as the binding source object. |
![]() | FallbackValue | Gets or sets the value to use when the binding is unable to return a value. (Inherited from BindingBase.) |
![]() | Mode | Gets or sets a value that indicates the direction of the data flow in the binding. |
![]() | NotifyOnValidationError | Gets or sets a value that indicates whether the BindingValidationError event is raised on validation errors. |
![]() | Path | Gets or sets the path to the binding source property. |
![]() | RelativeSource | Gets or sets the binding source by specifying its location relative to the position of the binding target. |
![]() | Source | Gets or sets the data source for the binding. |
![]() | StringFormat | Gets or sets a string that specifies how to format the binding if it displays the bound value as a string. (Inherited from BindingBase.) |
![]() | TargetNullValue | Gets or sets the value that is used in the target when the value of the source is nullptr. (Inherited from BindingBase.) |
![]() | UpdateSourceTrigger | Gets or sets a value that determines the timing of binding source updates for two-way bindings. |
![]() | ValidatesOnDataErrors | Gets or sets a value that indicates whether the binding engine will report validation errors from an IDataErrorInfo implementation on the bound data entity. |
![]() | ValidatesOnExceptions | Gets or sets a value that indicates whether the binding engine will report exception validation errors. |
![]() | ValidatesOnNotifyDataErrors | Gets or sets a value that indicates whether the binding engine will report validation errors from an INotifyDataErrorInfo implementation on the bound data entity. |
| Name | Description | |
|---|---|---|
![]() | CheckSealed | Throws an exception if the binding has already been attached to a binding target. (Inherited from BindingBase.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ISupportInitialize::BeginInit | Signals the object that initialization is starting. |
![]() ![]() | ISupportInitialize::EndInit | Signals the object that initialization is complete. |
The Binding markup extension enables you to specify a Binding value as a single attribute string, including setting Binding properties such as Path and Source.
A Binding object connects a dependency property of a FrameworkElement directly to a data object so that updates to the data object are automatically propagated to the property. The Binding class defines the properties of a binding. Each binding must have a target element, target property, and data source, although some values are provided by default if you do not specify them.
To bind to a property or a subproperty on a data object, set the Path property of the Binding object.
You can apply an instance of a Binding class to multiple targets. However, you cannot modify the property values of a Binding object after you attach it to a target element.
Note: |
|---|
Calling the FrameworkElement::SetBinding method and passing in a new Binding object will not necessarily remove an existing binding. Instead, you should use the DependencyObject::ClearValue method. |





Note: