AttributeProviderAttribute Konstruktorok
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Inicializálja a AttributeProviderAttribute osztály új példányát.
Túlterhelések
| Name | Description |
|---|---|
| AttributeProviderAttribute(String) |
Inicializálja az AttributeProviderAttribute osztály új példányát a megadott típusnévvel. |
| AttributeProviderAttribute(Type) |
Inicializálja az AttributeProviderAttribute osztály új példányát az adott típussal. |
| AttributeProviderAttribute(String, String) |
Inicializálja az osztály új példányát a AttributeProviderAttribute megadott típusnévvel és tulajdonságnévvel. |
AttributeProviderAttribute(String)
Inicializálja az AttributeProviderAttribute osztály új példányát a megadott típusnévvel.
public:
AttributeProviderAttribute(System::String ^ typeName);
public AttributeProviderAttribute(string typeName);
new System.ComponentModel.AttributeProviderAttribute : string -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (typeName As String)
Paraméterek
- typeName
- String
A megadni kívánt típus neve.
Kivételek
typeName az null.
Lásd még
A következőre érvényes:
AttributeProviderAttribute(Type)
Inicializálja az AttributeProviderAttribute osztály új példányát az adott típussal.
public:
AttributeProviderAttribute(Type ^ type);
public AttributeProviderAttribute(Type type);
new System.ComponentModel.AttributeProviderAttribute : Type -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (type As Type)
Paraméterek
- type
- Type
A megadható típus.
Kivételek
type az null.
Példák
Az alábbi példakód bemutatja, AttributeProviderAttribute hogy milyen DataSource típusú tulajdonságot IListSourcejelölhet meg. A teljes kódlistát a Az attribútumok alkalmazása Windows Forms vezérlőkben című témakörben talál.
[Category("Data")]
[Description("Indicates the source of data for the control.")]
[RefreshProperties(RefreshProperties.Repaint)]
[AttributeProvider(typeof(IListSource))]
public object DataSource
{
get => _dataGridView1.DataSource;
set => _dataGridView1.DataSource = value;
}
<Category("Data"), _
Description("Indicates the source of data for the control."), _
RefreshProperties(RefreshProperties.Repaint), _
AttributeProvider(GetType(IListSource))> _
Public Property DataSource() As Object
Get
Return Me.dataGridView1.DataSource
End Get
Set(ByVal value As Object)
Me.dataGridView1.DataSource = value
End Set
End Property
Lásd még
A következőre érvényes:
AttributeProviderAttribute(String, String)
Inicializálja az osztály új példányát a AttributeProviderAttribute megadott típusnévvel és tulajdonságnévvel.
public:
AttributeProviderAttribute(System::String ^ typeName, System::String ^ propertyName);
public AttributeProviderAttribute(string typeName, string propertyName);
new System.ComponentModel.AttributeProviderAttribute : string * string -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (typeName As String, propertyName As String)
Paraméterek
- typeName
- String
A megadni kívánt típus neve.
- propertyName
- String
Annak a tulajdonságnak a neve, amelyhez az attribútumok le lesznek kérve.
Kivételek
propertyName az null.