BindableAttribute Konstruktory

Definice

Inicializuje novou instanci BindableAttribute třídy.

Přetížení

BindableAttribute(Boolean)

Inicializuje novou instanci BindableAttribute třídy s logickou hodnotou.

BindableAttribute(BindableSupport)

Inicializuje novou instanci BindableAttribute třídy s jednou z BindableSupport hodnot.

BindableAttribute(Boolean, BindingDirection)

Inicializuje novou instanci BindableAttribute třídy.

BindableAttribute(BindableSupport, BindingDirection)

Inicializuje novou instanci BindableAttribute třídy.

BindableAttribute(Boolean)

Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs

Inicializuje novou instanci BindableAttribute třídy s logickou hodnotou.

public:
 BindableAttribute(bool bindable);
public BindableAttribute (bool bindable);
new System.ComponentModel.BindableAttribute : bool -> System.ComponentModel.BindableAttribute
Public Sub New (bindable As Boolean)

Parametry

bindable
Boolean

truepoužít vlastnost pro vazbu; v opačném případě . false

Příklady

Následující příklad kódu označuje vlastnost, která je vhodná pro vytvoření vazby dat. Tento příklad kódu vytvoří novou BindableAttribute, nastaví jeho hodnotu na BindableAttribute.Yesa vytvoří vazbu na vlastnost .

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

Poznámky

Když označíte vlastnost nastavenou BindableAttribute na true, hodnota tohoto atributu se nastaví na konstantní člen Yes. Pro vlastnost označenou nastavenou BindableAttribute na falsehodnotu je Nohodnota . Proto pokud chcete zkontrolovat hodnotu tohoto atributu v kódu, musíte zadat atribut jako BindableAttribute.Yes nebo BindableAttribute.No.

Viz také

Platí pro

BindableAttribute(BindableSupport)

Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs

Inicializuje novou instanci BindableAttribute třídy s jednou z BindableSupport hodnot.

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)

Parametry

flags
BindableSupport

Jedna z BindableSupport hodnot.

Příklady

Následující příklad kódu označuje vlastnost, která je vhodná pro vytvoření vazby dat. Tento příklad kódu vytvoří novou BindableAttribute, nastaví jeho hodnotu na BindableAttribute.Yesa vytvoří vazbu na vlastnost .


   [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

Poznámky

Když označíte vlastnost nastavenou BindableAttribute na true, hodnota tohoto atributu se nastaví na konstantní člen Yes. Pro vlastnost označenou nastavenou BindableAttribute na falsehodnotu je Nohodnota . Proto pokud chcete zkontrolovat hodnotu tohoto atributu v kódu, musíte zadat atribut jako BindableAttribute.Yes nebo BindableAttribute.No.

Viz také

Platí pro

BindableAttribute(Boolean, BindingDirection)

Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs

Inicializuje novou instanci BindableAttribute třídy.

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)

Parametry

bindable
Boolean

truepoužít vlastnost pro vazbu; v opačném případě . false

direction
BindingDirection

Jedna z BindingDirection hodnot.

Platí pro

BindableAttribute(BindableSupport, BindingDirection)

Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs
Zdroj:
BindableAttribute.cs

Inicializuje novou instanci BindableAttribute třídy.

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)

Parametry

flags
BindableSupport

Jedna z BindableSupport hodnot.

direction
BindingDirection

Jedna z BindingDirection hodnot.

Platí pro