AttributeProviderAttribute Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy AttributeProviderAttribute.

Przeciążenia

Nazwa Opis
AttributeProviderAttribute(String)

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

AttributeProviderAttribute(Type)

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy przy użyciu danego typu.

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
Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs

Inicjuje nowe wystąpienie AttributeProviderAttribute 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

Parametr typeName ma wartość null.

Zobacz też

Dotyczy

AttributeProviderAttribute(Type)

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

Inicjuje AttributeProviderAttribute nowe wystąpienie klasy przy użyciu danego typu.

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

Parametr type ma wartość null.

Przykłady

W poniższym przykładzie kodu pokazano użycie do AttributeProviderAttribute oznaczania DataSource właściwości o określonym typie IListSource. Aby uzyskać pełną listę kodu, zobacz Jak: zastosuj atrybuty 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 => _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

Zobacz też

Dotyczy

AttributeProviderAttribute(String, String)

Źródło:
AttributeProviderAttribute.cs
Źródło:
AttributeProviderAttribute.cs
Ź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

Parametr propertyName ma wartość null.

Zobacz też

Dotyczy