Bagikan melalui


DescriptionAttribute.DescriptionValue Property

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

Gets or sets the string stored as the description.

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

Syntax

'Declaration
Protected Property DescriptionValue As String
protected string DescriptionValue { get; set; }

Property Value

Type: System.String
The string stored as the description. The default value is an empty string ("").

Remarks

The default implementation of the Description property simply returns this value.

This extra property exists so that you can derive from DescriptionAttribute and provide a localized version. The derived localizable DescriptionAttribute will maintain a private Boolean field to indicate whether it has been localized. On the first access to the Description property, it will look up the localized string and store it back in the DescriptionValue property.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

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