AttributeProviderAttribute Constructors

Definitie

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse.

Overloads

Name Description
AttributeProviderAttribute(String)

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse met de opgegeven typenaam.

AttributeProviderAttribute(Type)

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse met het opgegeven type.

AttributeProviderAttribute(String, String)

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse met de opgegeven typenaam en eigenschapsnaam.

AttributeProviderAttribute(String)

Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse met de opgegeven typenaam.

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

Parameters

typeName
String

De naam van het type dat u wilt opgeven.

Uitzonderingen

typeName is null.

Zie ook

Van toepassing op

AttributeProviderAttribute(Type)

Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse met het opgegeven type.

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

Parameters

type
Type

Het type dat moet worden opgegeven.

Uitzonderingen

type is null.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u AttributeProviderAttribute een DataSource eigenschap markeert met een specifiek type IListSource. Zie How to: Attributes toepassen in Windows Forms Controls voor een volledige codevermelding.

[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

Zie ook

Van toepassing op

AttributeProviderAttribute(String, String)

Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs
Bron:
AttributeProviderAttribute.cs

Initialiseert een nieuw exemplaar van de AttributeProviderAttribute klasse met de opgegeven typenaam en eigenschapsnaam.

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)

Parameters

typeName
String

De naam van het type dat u wilt opgeven.

propertyName
String

De naam van de eigenschap waarvoor kenmerken worden opgehaald.

Uitzonderingen

propertyName is null.

Zie ook

Van toepassing op