Retrieves the BindingExpression for a dependency property where a binding is established.
Public Function GetBindingExpression ( _ dp As DependencyProperty _ ) As BindingExpression
public BindingExpression GetBindingExpression( DependencyProperty dp )
In the current implementation, this method returns the same result as ReadLocalValue, with the return value cast to BindingExpression.
You could potentially use GetBindingExpression as a test to see whether a given dependency property has a binding applied to it, by attempting the cast of the return value to BindingExpression. If this succeeds, the property is currently being set by a data-bound value. If the value is nullNothingnullptra null reference (Nothing in Visual Basic) rather than a BindingExpression, then the property you queried is not data-bound.
A BindingExpression object enables the following scenarios with its API:
You can force a source update for a binding independent of the existing update trigger on the binding by calling BindingExpression..::.UpdateSource.
You can access the current source value by calling BindingExpression..::.DataItem.
You can obtain more information about the original binding and its declaration by calling BindingExpression..::.ParentBinding. From the returned object, you can determine Binding..::.Mode, Binding..::.Path, and so on.
For more information, see BindingExpression or Data Binding.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.