Condividi tramite


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.

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.SharePoint.WebPartPages.FriendlyNameAttribute

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Property)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class FriendlyNameAttribute _
    Inherits Attribute
'Usage
Dim instance As FriendlyNameAttribute
[AttributeUsageAttribute(AttributeTargets.Property)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class FriendlyNameAttribute : Attribute

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.

Thread Safety

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

See Also

Reference

FriendlyNameAttribute Members

Microsoft.SharePoint.WebPartPages Namespace