BindableAttribute コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
BindableAttribute クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| BindableAttribute(Boolean) |
ブール値を使用して、BindableAttribute クラスの新しいインスタンスを初期化します。 |
| BindableAttribute(BindableSupport) |
BindableAttribute値のいずれかを使用して、BindableSupport クラスの新しいインスタンスを初期化します。 |
| BindableAttribute(Boolean, BindingDirection) |
BindableAttribute クラスの新しいインスタンスを初期化します。 |
| BindableAttribute(BindableSupport, BindingDirection) |
BindableAttribute クラスの新しいインスタンスを初期化します。 |
BindableAttribute(Boolean)
ブール値を使用して、BindableAttribute クラスの新しいインスタンスを初期化します。
public:
BindableAttribute(bool bindable);
public BindableAttribute(bool bindable);
new System.ComponentModel.BindableAttribute : bool -> System.ComponentModel.BindableAttribute
Public Sub New (bindable As Boolean)
パラメーター
- bindable
- Boolean
true バインディングにプロパティを使用する場合。それ以外の場合は false。
例
次のコード例では、データのバインドに適したプロパティをマークします。 このコード例では、新しい BindableAttributeを作成し、その値を BindableAttribute.Yes に設定して、プロパティにバインドします。
public:
[property:Bindable(true)]
property int MyProperty
{
int get()
{
// Insert code here.
return 0;
}
void set( int theValue )
{
// Insert code here.
}
}
[Bindable(true)]
public int MyProperty {
get {
// Insert code here.
return 0;
}
set {
// Insert code here.
}
}
<Bindable(true)> _
Public Property MyProperty As Integer
Get
' Insert code here.
Return 0
End Get
Set
' Insert code here.
End Set
End Property
注釈
BindableAttributeを true に設定してプロパティをマークすると、この属性の値は定数メンバー Yesに設定されます。
BindableAttributeが false に設定されたプロパティの場合、値はNo。 したがって、コードでこの属性の値を確認するには、属性を BindableAttribute.Yes または BindableAttribute.Noとして指定する必要があります。
こちらもご覧ください
適用対象
BindableAttribute(BindableSupport)
BindableAttribute値のいずれかを使用して、BindableSupport クラスの新しいインスタンスを初期化します。
public:
BindableAttribute(System::ComponentModel::BindableSupport flags);
public BindableAttribute(System.ComponentModel.BindableSupport flags);
new System.ComponentModel.BindableAttribute : System.ComponentModel.BindableSupport -> System.ComponentModel.BindableAttribute
Public Sub New (flags As BindableSupport)
パラメーター
- flags
- BindableSupport
BindableSupport値の 1 つ。
例
次のコード例では、データのバインドに適したプロパティをマークします。 このコード例では、新しい BindableAttributeを作成し、その値を BindableAttribute.Yes に設定して、プロパティにバインドします。
[Bindable(BindableSupport::Yes)]
int get()
{
// Insert code here.
return 0;
}
void set( int theValue )
{
// Insert code here.
}
}
[Bindable(BindableSupport.Yes)]
public int MyProperty {
get {
// Insert code here.
return 0;
}
set {
// Insert code here.
}
}
<Bindable(BindableSupport.Yes)> _
Public Property MyProperty As Integer
Get
' Insert code here.
Return 0
End Get
Set
' Insert code here.
End Set
End Property
注釈
BindableAttributeを true に設定してプロパティをマークすると、この属性の値は定数メンバー Yesに設定されます。
BindableAttributeが false に設定されたプロパティの場合、値はNo。 したがって、コードでこの属性の値を確認するには、属性を BindableAttribute.Yes または BindableAttribute.Noとして指定する必要があります。
こちらもご覧ください
適用対象
BindableAttribute(Boolean, BindingDirection)
BindableAttribute クラスの新しいインスタンスを初期化します。
public:
BindableAttribute(bool bindable, System::ComponentModel::BindingDirection direction);
public BindableAttribute(bool bindable, System.ComponentModel.BindingDirection direction);
new System.ComponentModel.BindableAttribute : bool * System.ComponentModel.BindingDirection -> System.ComponentModel.BindableAttribute
Public Sub New (bindable As Boolean, direction As BindingDirection)
パラメーター
- bindable
- Boolean
true バインディングにプロパティを使用する場合。それ以外の場合は false。
- direction
- BindingDirection
BindingDirection値の 1 つ。
適用対象
BindableAttribute(BindableSupport, BindingDirection)
BindableAttribute クラスの新しいインスタンスを初期化します。
public:
BindableAttribute(System::ComponentModel::BindableSupport flags, System::ComponentModel::BindingDirection direction);
public BindableAttribute(System.ComponentModel.BindableSupport flags, System.ComponentModel.BindingDirection direction);
new System.ComponentModel.BindableAttribute : System.ComponentModel.BindableSupport * System.ComponentModel.BindingDirection -> System.ComponentModel.BindableAttribute
Public Sub New (flags As BindableSupport, direction As BindingDirection)
パラメーター
- flags
- BindableSupport
BindableSupport値の 1 つ。
- direction
- BindingDirection
BindingDirection値の 1 つ。