AttributeProviderAttribute Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy AttributeProviderAttribute.

Przeciążenia

AttributeProviderAttribute(String)

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy o podanej nazwie typu.

AttributeProviderAttribute(Type)

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy o danym typie.

AttributeProviderAttribute(String, String)

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy o podanej nazwie typu i nazwie właściwości.

AttributeProviderAttribute(String)

Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy o podanej nazwie 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

Nazwa typu do określenia.

Wyjątki

typeName to null.

Zobacz też

Dotyczy

AttributeProviderAttribute(Type)

Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy o danym typie.

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 do określenia.

Wyjątki

type to null.

Przykłady

W poniższym przykładzie kodu pokazano użycie funkcji AttributeProviderAttribute oznaczania DataSource właściwości o określonym typie IListSource. Aby uzyskać pełną listę kodu, zobacz How to: Apply Attributes in Windows Forms Controls (Instrukcje: stosowanie atrybutów w kontrolkach 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

Zobacz też

Dotyczy

AttributeProviderAttribute(String, String)

Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy o podanej nazwie typu i nazwie właściwości.

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

Nazwa typu do określenia.

propertyName
String

Nazwa właściwości, dla której zostaną pobrane atrybuty.

Wyjątki

propertyName to null.

Zobacz też

Dotyczy