BindableAttribute Construtores
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Inicializa uma nova instância da classe BindableAttribute.
Sobrecargas
| Nome | Description |
|---|---|
| BindableAttribute(Boolean) |
Inicializa uma nova instância da BindableAttribute classe com um valor booliano. |
| BindableAttribute(BindableSupport) |
Inicializa uma nova instância da BindableAttribute classe com um dos BindableSupport valores. |
| BindableAttribute(Boolean, BindingDirection) |
Inicializa uma nova instância da classe BindableAttribute. |
| BindableAttribute(BindableSupport, BindingDirection) |
Inicializa uma nova instância da classe BindableAttribute. |
BindableAttribute(Boolean)
Inicializa uma nova instância da BindableAttribute classe com um valor booliano.
public:
BindableAttribute(bool bindable);
public BindableAttribute(bool bindable);
new System.ComponentModel.BindableAttribute : bool -> System.ComponentModel.BindableAttribute
Public Sub New (bindable As Boolean)
Parâmetros
- bindable
- Boolean
true para usar a propriedade para associação; caso contrário, false.
Exemplos
O exemplo de código a seguir marca uma propriedade conforme apropriado para associar dados. Este exemplo de código cria um novo BindableAttribute, define seu valor BindableAttribute.Yescomo e o associa à propriedade.
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
Comentários
Quando você marca uma propriedade com o BindableAttribute conjunto como true, o valor desse atributo é definido como o membro Yesconstante. Para uma propriedade marcada com o BindableAttribute conjunto como false, o valor é No. Portanto, para verificar o valor desse atributo em seu código, você deve especificar o atributo como BindableAttribute.Yes ou BindableAttribute.No.
Confira também
Aplica-se a
BindableAttribute(BindableSupport)
Inicializa uma nova instância da BindableAttribute classe com um dos BindableSupport valores.
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)
Parâmetros
- flags
- BindableSupport
Um dos BindableSupport valores.
Exemplos
O exemplo de código a seguir marca uma propriedade conforme apropriado para associar dados. Este exemplo de código cria um novo BindableAttribute, define seu valor BindableAttribute.Yescomo e o associa à propriedade.
[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
Comentários
Quando você marca uma propriedade com o BindableAttribute conjunto como true, o valor desse atributo é definido como o membro Yesconstante. Para uma propriedade marcada com o BindableAttribute conjunto como false, o valor é No. Portanto, para verificar o valor desse atributo em seu código, você deve especificar o atributo como BindableAttribute.Yes ou BindableAttribute.No.
Confira também
Aplica-se a
BindableAttribute(Boolean, BindingDirection)
Inicializa uma nova instância da classe 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)
Parâmetros
- bindable
- Boolean
true para usar a propriedade para associação; caso contrário, false.
- direction
- BindingDirection
Um dos BindingDirection valores.
Aplica-se a
BindableAttribute(BindableSupport, BindingDirection)
Inicializa uma nova instância da classe 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)
Parâmetros
- flags
- BindableSupport
Um dos BindableSupport valores.
- direction
- BindingDirection
Um dos BindingDirection valores.