BindableAttribute Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av BindableAttribute klassen.
Överlagringar
| Name | Description |
|---|---|
| BindableAttribute(Boolean) |
Initierar en ny instans av BindableAttribute klassen med ett booleskt värde. |
| BindableAttribute(BindableSupport) |
Initierar en ny instans av BindableAttribute klassen med ett av BindableSupport värdena. |
| BindableAttribute(Boolean, BindingDirection) |
Initierar en ny instans av BindableAttribute klassen. |
| BindableAttribute(BindableSupport, BindingDirection) |
Initierar en ny instans av BindableAttribute klassen. |
BindableAttribute(Boolean)
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
Initierar en ny instans av BindableAttribute klassen med ett booleskt värde.
public:
BindableAttribute(bool bindable);
public BindableAttribute(bool bindable);
new System.ComponentModel.BindableAttribute : bool -> System.ComponentModel.BindableAttribute
Public Sub New (bindable As Boolean)
Parametrar
- bindable
- Boolean
trueatt använda egenskapen för bindning; annars . false
Exempel
Följande kodexempel markerar en egenskap som är lämplig att binda data till. Det här kodexemplet skapar ett nytt BindableAttribute, anger dess värde till BindableAttribute.Yesoch binder det till egenskapen.
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
Kommentarer
När du markerar en egenskap med BindableAttribute värdet inställd truepå anges värdet för det här attributet till den konstanta medlemmen Yes. För en egenskap som har markerats BindableAttribute med värdet falseär Novärdet . För att kontrollera värdet för det här attributet i koden måste du därför ange attributet som BindableAttribute.Yes eller BindableAttribute.No.
Se även
Gäller för
BindableAttribute(BindableSupport)
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
Initierar en ny instans av BindableAttribute klassen med ett av BindableSupport värdena.
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)
Parametrar
- flags
- BindableSupport
Ett av BindableSupport värdena.
Exempel
Följande kodexempel markerar en egenskap som är lämplig att binda data till. Det här kodexemplet skapar ett nytt BindableAttribute, anger dess värde till BindableAttribute.Yesoch binder det till egenskapen.
[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
Kommentarer
När du markerar en egenskap med BindableAttribute värdet inställd truepå anges värdet för det här attributet till den konstanta medlemmen Yes. För en egenskap som har markerats BindableAttribute med värdet falseär Novärdet . För att kontrollera värdet för det här attributet i koden måste du därför ange attributet som BindableAttribute.Yes eller BindableAttribute.No.
Se även
Gäller för
BindableAttribute(Boolean, BindingDirection)
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
Initierar en ny instans av BindableAttribute klassen.
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)
Parametrar
- bindable
- Boolean
trueatt använda egenskapen för bindning; annars . false
- direction
- BindingDirection
Ett av BindingDirection värdena.
Gäller för
BindableAttribute(BindableSupport, BindingDirection)
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
- Källa:
- BindableAttribute.cs
Initierar en ny instans av BindableAttribute klassen.
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)
Parametrar
- flags
- BindableSupport
Ett av BindableSupport värdena.
- direction
- BindingDirection
Ett av BindingDirection värdena.