FrameworkPropertyMetadata.IsDataBindingAllowed Property

Gets a value that indicates whether data binding is supported for the dependency property.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public ReadOnly Property IsDataBindingAllowed As Boolean
Members of this class are not typically used in XAML.

Property Value

Type: System.Boolean
true if data binding is supported on the dependency property to which this metadata applies; otherwise, false. The default is true.

This property reports false for one of two possible conditions: either data binding to a dependency property is not allowed because the dependency property is read-only (as reported in the dependency property identifier, not the metadata), or the value of another metadata property, IsNotDataBindable, is set to true in this metadata. This property is exposed as a convenience so that callers do not have to check both ReadOnly and IsNotDataBindable.

If you are attempting to create metadata that specifies that an otherwise read/write property should not support data binding, specify the flag NotDataBindable (note the slight naming convention difference versus IsNotDataBindable).

The following example obtains the default metadata from various dependency property fields, queries the value of various FrameworkPropertyMetadata properties on it, and uses the information to populate a table to implement a "metadata browser".

		pm = dp.GetMetadata(dp.OwnerType)


...


		Dim fpm As FrameworkPropertyMetadata = TryCast(pm, FrameworkPropertyMetadata)
		If fpm IsNot Nothing Then
			AffectsArrange.Text = If((fpm.AffectsArrange), "Yes", "No")
			AffectsMeasure.Text = If((fpm.AffectsMeasure), "Yes", "No")
			AffectsRender.Text = If((fpm.AffectsRender), "Yes", "No")
                [Inherits].Text = If((fpm.Inherits), "Yes", "No")
			IsDataBindingAllowed.Text = If((fpm.IsDataBindingAllowed), "Yes", "No")
			BindsTwoWayByDefault.Text = If((fpm.BindsTwoWayByDefault), "Yes", "No")

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft