System.ComponentModel.BindableAttribute Class

Specifies whether a member is typically used for binding. This class cannot be inherited.

See Also: BindableAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.All)]
public sealed class BindableAttribute : Attribute

Remarks

You can specify this attribute for multiple members, typically properties, on a control.

If a property has been marked with the System.ComponentModel.BindableAttribute set to true, then a property change notification should be raised for that property. This means that if the BindableAttribute.Bindable property is BindableAttribute.Yes, then two-way data binding is supported. If BindableAttribute.Bindable is BindableAttribute.No, you can still bind to the property, but it should not be shown in the default set of properties to bind to, because it might or might not raise a property change notification.

Note:

When you mark a property with BindableAttribute.#ctor(bool) set to true, the value of this attribute is set to the constant member BindableAttribute.Yes. For a property marked with the BindableAttribute.#ctor(bool) set to false, the value is BindableAttribute.No. Therefore, to check the value of this attribute in your code, you must specify the attribute as BindableAttribute.Yes or BindableAttribute.No.

Note:

You can use this attribute at design time only. Nothing prevents you from binding to any property during run time.

For more information, see Extending Metadata Using Attributes.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0