Bindable​Attribute Bindable​Attribute Bindable​Attribute Class

Definition

Specifies that a type defined in C++ can be used for binding.

public sealed class BindableAttribute : Attributepublic sealed class BindableAttribute : AttributePublic NotInheritable Class BindableAttribute Inherits Attribute
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Apply this attribute to C++-based data classes to enable their use as binding sources. Common language runtime (CLR) types, including all types defined in C# and Microsoft Visual Basic, are bindable by default. You can also make a type bindable by implementing ICustomPropertyProvider. For more info, see Data binding in depth.

Examples

The following code example shows the typical usage pattern for this attribute. For the complete code listing, see the XAML data binding sample.

[Windows::UI::Xaml::Data::Bindable]
public ref class Employee sealed : Windows::UI::Xaml::Data::INotifyPropertyChanged
{
    // ...
}

Constructors

BindableAttribute() BindableAttribute() BindableAttribute()

Initializes a new instance of the BindableAttribute class.

public BindableAttribute()public BindableAttribute()Public Sub New()
Attributes

See Also