BindableAttribute Construtores

Definição

Inicializa uma nova instância da BindableAttribute classe.

Sobrecargas

Name Description
BindableAttribute(Boolean)

Inicializa uma nova instância da BindableAttribute classe com um valor booleano.

BindableAttribute(BindableSupport)

Inicializa uma nova instância da BindableAttribute classe com um dos BindableSupport valores.

BindableAttribute(Boolean, BindingDirection)

Inicializa uma nova instância da BindableAttribute classe.

BindableAttribute(BindableSupport, BindingDirection)

Inicializa uma nova instância da BindableAttribute classe.

BindableAttribute(Boolean)

Inicializa uma nova instância da BindableAttribute classe com um valor booleano.

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 a ligação; caso contrário, false.

Exemplos

O exemplo de código seguinte marca uma propriedade como apropriada para atribuir dados. Este exemplo de código cria um novo BindableAttribute, define o seu valor para BindableAttribute.Yes, e liga-o à 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

Observações

Quando se marca uma propriedade com o BindableAttribute conjunto em true, o valor deste atributo é definido para o elemento Yesconstante . Para uma propriedade marcada com o BindableAttribute conjunto de , falseo valor é No. Portanto, para verificar o valor deste atributo no seu código, deve especificar o atributo como BindableAttribute.Yes ou BindableAttribute.No.

Ver 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 seguinte marca uma propriedade como apropriada para atribuir dados. Este exemplo de código cria um novo BindableAttribute, define o seu valor para BindableAttribute.Yes, e liga-o à 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

Observações

Quando se marca uma propriedade com o BindableAttribute conjunto em true, o valor deste atributo é definido para o elemento Yesconstante . Para uma propriedade marcada com o BindableAttribute conjunto de , falseo valor é No. Portanto, para verificar o valor deste atributo no seu código, deve especificar o atributo como BindableAttribute.Yes ou BindableAttribute.No.

Ver também

Aplica-se a

BindableAttribute(Boolean, BindingDirection)

Inicializa uma nova instância da BindableAttribute classe.

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 a ligação; caso contrário, false.

direction
BindingDirection

Um dos BindingDirection valores.

Aplica-se a

BindableAttribute(BindableSupport, BindingDirection)

Inicializa uma nova instância da BindableAttribute classe.

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.

Aplica-se a