Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​ComponentModel.​DataAnnotations.​DisplayAttribute

Assembly: System.ComponentModel.Annotations

Inheritance: object → Attribute → DisplayAttribute

Provides a general-purpose attribute that lets you specify localizable strings for types and members of entity partial classes.

Properties

public bool
AutoGenerateField
Gets or sets a value that indicates whether UI should be generated automatically in order to display this field.
public bool
AutoGenerateFilter
Gets or sets a value that indicates whether filtering UI is automatically displayed for this field.
public string
Description
Gets or sets a value that is used to display a description in the UI.
public string
GroupName
Gets or sets a value that is used to group fields in the UI.
public string
Name
Gets or sets a value that is used for display in the UI.
public int
Order
Gets or sets the order weight of the column.
public string
Prompt
Gets or sets a value that will be used to set the watermark for prompts in the UI.
public Type
ResourceType
Gets or sets the type that contains the resources for the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName" /> , <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Name" /> , <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt" /> , and <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Description" /> properties.
public string
ShortName
Gets or sets a value that is used for the grid column label.
public object
TypeId

Methods

public bool?
GetAutoGenerateField​()
Returns the value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateField" /> property.
Returns The value of <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateField" /> if the property has been initialized; otherwise, <see langword="null" /> .
public bool?
GetAutoGenerateFilter​()
Returns a value that indicates whether UI should be generated automatically in order to display filtering for this field.
Returns The value of <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.AutoGenerateFilter" /> if the property has been initialized; otherwise, <see langword="null" /> .
public string
GetDescription​()
Returns the value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Description" /> property.
Returns The localized description, if the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType" /> has been specified and the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Description" /> property represents a resource key; otherwise, the non-localized value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Description" /> property.
public string
GetGroupName​()
Returns the value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.GroupName" /> property.
Returns A value that will be used for grouping fields in the UI, if <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.GroupName" /> has been initialized; otherwise, <see langword="null" /> . If the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType" /> property has been specified and the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.GroupName" /> property represents a resource key, a localized string is returned; otherwise, a non-localized string is returned.
public string
GetName​()
Returns a value that is used for field display in the UI.
Returns The localized string for the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Name" /> property, if the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType" /> property has been specified and the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Name" /> property represents a resource key; otherwise, the non-localized value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Name" /> property.
public int?
GetOrder​()
Returns the value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Order" /> property.
Returns The value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Order" /> property, if it has been set; otherwise, <see langword="null" /> .
public string
GetPrompt​()
Returns the value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt" /> property.
Returns The localized string for the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt" /> property if the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType" /> property has been specified and if the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt" /> property represents a resource key; otherwise, the non-localized value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.Prompt" /> property.
public string
GetShortName​()
Returns the value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName" /> property.
Returns The localized string for the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName" /> property if the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ResourceType" /> property has been specified and if the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName" /> property represents a resource key; otherwise, the non-localized value of the <see cref="P:System.ComponentModel.DataAnnotations.DisplayAttribute.ShortName" /> value property.
public bool
Equals​(object obj)
Inherited from Attribute
public int
GetHashCode​()
Inherited from Attribute
public bool
IsDefaultAttribute​()
Inherited from Attribute
public bool
Match​(object obj)
Inherited from Attribute
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object