Compartilhar via


FriendlyNameAttribute Class

The FriendlyNameAttribute class specifies the caption displayed in the property pane for a Web Part's custom property. If you don't specify this attribute, the actual property name will be displayed in the property pane.

System.Object

   System.Attribute

      Microsoft.SharePoint.WebPartPages.FriendlyNameAttribute

Public Constructors

The following table shows the constructor of the FriendlyNameAttribute class with a brief description:

Name Description
FriendlyNameAttribute Initializes a new instance of the FriendlyNameAttribute class.

Public Properties

The following table shows the properties of the FriendlyNameAttribute class, the data type of the property, and a brief description. The property is read/write except where noted.

Name Data Type Description
FriendlyName String Gets the caption displayed in the property pane for a Web Part's custom property.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

The attributes that determine the caption that is displayed for a custom property are applied in the following order. If the ResourcesAttribute attribute is not specified, then the value of the FriendlyNameAttribute attribute is used. If the FriendlyNameAttribute attribute is not specified, then the actual property name is used.

Requirements

Namespace: Microsoft.SharePoint.WebPartPages

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security