BindableAttribute attribute

Applies to Windows and Windows Phone

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

Inheritance

Object
  Attribute
    BindableAttribute

Syntax


public sealed class BindableAttribute : Attribute

Attributes

[AttributeUsage(512)]
[Version(0x6020000)]

Members

The BindableAttribute attribute has these types of members:

Constructors

The BindableAttribute attribute has these constructors.

ConstructorDescription
BindableAttribute Initializes a new instance of the BindableAttribute class.

 

Methods

The BindableAttribute attribute inherits methods from the Object class.

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 overview.

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
{
    // ...
}

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Data
Windows::UI::Xaml::Data [C++]

Metadata

Windows.winmd

See also

Attribute
Binding
ICustomPropertyProvider
XAML data binding sample
Data binding overview

 

 

Show:
© 2014 Microsoft