Bewerken

Delen via


UIHintAttribute Constructors

Definition

Initializes a new instance of the UIHintAttribute class.

Overloads

UIHintAttribute(String)

Initializes a new instance of the UIHintAttribute class by using a specified user control.

UIHintAttribute(String, String)

Initializes a new instance of the UIHintAttribute class using the specified user control and specified presentation layer.

UIHintAttribute(String, String, Object[])

Initializes a new instance of the UIHintAttribute class by using the specified user control, presentation layer, and control parameters.

UIHintAttribute(String)

Source:
UIHintAttribute.cs
Source:
UIHintAttribute.cs
Source:
UIHintAttribute.cs

Initializes a new instance of the UIHintAttribute class by using a specified user control.

public:
 UIHintAttribute(System::String ^ uiHint);
public UIHintAttribute (string uiHint);
new System.ComponentModel.DataAnnotations.UIHintAttribute : string -> System.ComponentModel.DataAnnotations.UIHintAttribute
Public Sub New (uiHint As String)

Parameters

uiHint
String

The user control to use to display the data field.

Remarks

A UIHintAttribute object that is created with this constructor is initialized using the specified uiHint, which specifies the user control (field template) to use in order to display the data field.

ASP.NET Dynamic Data provides field templates, page templates, and data controls to render data fields in a data model. You can modify these templates and controls to customize them, or you can create a custom user control. If you create a custom user control, you use the UIHint property to specify the user control to use to display a data field.

Applies to

UIHintAttribute(String, String)

Source:
UIHintAttribute.cs
Source:
UIHintAttribute.cs
Source:
UIHintAttribute.cs

Initializes a new instance of the UIHintAttribute class using the specified user control and specified presentation layer.

public:
 UIHintAttribute(System::String ^ uiHint, System::String ^ presentationLayer);
public UIHintAttribute (string uiHint, string presentationLayer);
public UIHintAttribute (string uiHint, string? presentationLayer);
new System.ComponentModel.DataAnnotations.UIHintAttribute : string * string -> System.ComponentModel.DataAnnotations.UIHintAttribute
Public Sub New (uiHint As String, presentationLayer As String)

Parameters

uiHint
String

The user control (field template) to use to display the data field.

presentationLayer
String

The presentation layer that uses the class. Can be set to "HTML", "Silverlight", "WPF", or "WinForms".

Applies to

UIHintAttribute(String, String, Object[])

Source:
UIHintAttribute.cs
Source:
UIHintAttribute.cs
Source:
UIHintAttribute.cs

Initializes a new instance of the UIHintAttribute class by using the specified user control, presentation layer, and control parameters.

public:
 UIHintAttribute(System::String ^ uiHint, System::String ^ presentationLayer, ... cli::array <System::Object ^> ^ controlParameters);
public UIHintAttribute (string uiHint, string presentationLayer, params object[] controlParameters);
public UIHintAttribute (string uiHint, string? presentationLayer, params object?[]? controlParameters);
new System.ComponentModel.DataAnnotations.UIHintAttribute : string * string * obj[] -> System.ComponentModel.DataAnnotations.UIHintAttribute
Public Sub New (uiHint As String, presentationLayer As String, ParamArray controlParameters As Object())

Parameters

uiHint
String

The user control (field template) to use to display the data field.

presentationLayer
String

The presentation layer that uses the class. Can be set to "HTML", "Silverlight", "WPF", or "WinForms".

controlParameters
Object[]

The object to use to retrieve values from any data sources.

Exceptions

ControlParameters is null or it is a constraint key.

-or-

The value of ControlParameters is not a string.

Applies to