BindableAttribute Конструкторы
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Инициализирует новый экземпляр класса BindableAttribute.
Перегрузки
| Имя | Описание |
|---|---|
| BindableAttribute(Boolean) |
Инициализирует новый экземпляр класса BindableAttribute с логическим значением. |
| BindableAttribute(BindableSupport) |
Инициализирует новый экземпляр BindableAttribute класса с одним из значений BindableSupport . |
| BindableAttribute(Boolean, BindingDirection) |
Инициализирует новый экземпляр класса BindableAttribute. |
| BindableAttribute(BindableSupport, BindingDirection) |
Инициализирует новый экземпляр класса BindableAttribute. |
BindableAttribute(Boolean)
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
Инициализирует новый экземпляр класса 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. Для свойства, помеченного набором BindableAttributefalse, значение равно No. Таким образом, чтобы проверить значение этого атрибута в коде, необходимо указать атрибут как BindableAttribute.Yes или BindableAttribute.No.
См. также раздел
Применяется к
BindableAttribute(BindableSupport)
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
Инициализирует новый экземпляр 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 .
Примеры
В следующем примере кода свойство помечает свойство соответствующим образом для привязки данных. Этот пример кода создает новый 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. Для свойства, помеченного набором BindableAttributefalse, значение равно No. Таким образом, чтобы проверить значение этого атрибута в коде, необходимо указать атрибут как BindableAttribute.Yes или BindableAttribute.No.
См. также раздел
Применяется к
BindableAttribute(Boolean, BindingDirection)
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
Инициализирует новый экземпляр класса 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 .
Применяется к
BindableAttribute(BindableSupport, BindingDirection)
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
- Исходный код:
- BindableAttribute.cs
Инициализирует новый экземпляр класса 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 .
- direction
- BindingDirection
Одно из значений BindingDirection .