Share via


AttributeProviderAttribute Konstruktory

Definice

Inicializuje novou instanci AttributeProviderAttribute třídy .

Přetížení

AttributeProviderAttribute(String)

Inicializuje novou instanci AttributeProviderAttribute třídy s názvem daného typu.

AttributeProviderAttribute(Type)

Inicializuje novou instanci AttributeProviderAttribute třídy s daným typem.

AttributeProviderAttribute(String, String)

Inicializuje novou instanci AttributeProviderAttribute třídy s názvem daného typu a názvem vlastnosti.

AttributeProviderAttribute(String)

Zdroj:
AttributeProviderAttribute.cs
Zdroj:
AttributeProviderAttribute.cs
Zdroj:
AttributeProviderAttribute.cs

Inicializuje novou instanci AttributeProviderAttribute třídy s názvem daného typu.

public:
 AttributeProviderAttribute(System::String ^ typeName);
public AttributeProviderAttribute (string typeName);
new System.ComponentModel.AttributeProviderAttribute : string -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (typeName As String)

Parametry

typeName
String

Název typu, který chcete zadat.

Výjimky

typeName je null.

Viz také

Platí pro

AttributeProviderAttribute(Type)

Zdroj:
AttributeProviderAttribute.cs
Zdroj:
AttributeProviderAttribute.cs
Zdroj:
AttributeProviderAttribute.cs

Inicializuje novou instanci AttributeProviderAttribute třídy s daným typem.

public:
 AttributeProviderAttribute(Type ^ type);
public AttributeProviderAttribute (Type type);
new System.ComponentModel.AttributeProviderAttribute : Type -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (type As Type)

Parametry

type
Type

Typ, který chcete zadat.

Výjimky

type je null.

Příklady

Následující příklad kódu ukazuje použití AttributeProviderAttribute k označení DataSource vlastnosti s konkrétním typem IListSource. Úplný výpis kódu najdete v tématu Postupy: Použití atributů v ovládacích prvcích model Windows Forms.

[Category("Data")]
[Description("Indicates the source of data for the control.")]
[RefreshProperties(RefreshProperties.Repaint)]
[AttributeProvider(typeof(IListSource))]
public object DataSource
{
    get
    {
        return this.dataGridView1.DataSource;
    }

    set
    {
        this.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

Viz také

Platí pro

AttributeProviderAttribute(String, String)

Zdroj:
AttributeProviderAttribute.cs
Zdroj:
AttributeProviderAttribute.cs
Zdroj:
AttributeProviderAttribute.cs

Inicializuje novou instanci AttributeProviderAttribute třídy s názvem daného typu a názvem vlastnosti.

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)

Parametry

typeName
String

Název typu, který chcete zadat.

propertyName
String

Název vlastnosti, pro kterou budou atributy načteny.

Výjimky

propertyName je null.

Viz také

Platí pro