Udostępnij za pośrednictwem


DisplayAttribute.ShortName Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets either a resource name or non-localized text that is used as the column label for an element that is bound to the member.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

Syntax

'Declaration
Public Property ShortName As String
public string ShortName { get; set; }

Property Value

Type: System.String
Either a resource name or the non-localized text that is used as the column label for an element that is bound to the member.

Remarks

Set the ShortName property to either a literal non-localized string or to a resource key to use with the ResourceType property to specify a localized short name.

Do not use the get accessor of the ShortName property to retrieve the text to display in your Silverlight application. Instead, use the GetShortName method to retrieve the short name value. The GetShortName method returns either the literal non-localized string or the localized string when a resource type is specified.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.