War diese Seite hilfreich?
Ihr Feedback ist uns wichtig. Teilen Sie uns Ihre Meinung mit.
Weiteres Feedback?
1500 verbleibende Zeichen
MSDN Library
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

FrameworkElement.GetBindingExpression Method

Retrieves the BindingExpression for a dependency property where a binding is established.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Function GetBindingExpression ( _
	dp As DependencyProperty _
) As BindingExpression

Parameters

dp
Type: System.Windows.DependencyProperty
The dependency property identifier for the specific property on this FrameworkElement where you want to obtain the BindingExpression.

Return Value

Type: System.Windows.Data.BindingExpression
A BindingExpression for the binding, if the local value represented a data-bound value. May return Nothing if the property is not a data-bound value.

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 Nothing rather than a BindingExpression, then the property you queried is not data-bound.

A BindingExpression object enables the following scenarios with its API:

For more information, see BindingExpression or Data binding for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Anzeigen:
© 2015 Microsoft