ResourcesAttribute class

Derived from Object.Attribute and used for specifying how a property should be localized.

System.Object
  System.Attribute
    Microsoft.SharePoint.WebPartPages.ResourcesAttribute

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

No code example is currently available or this language may not be supported.

At run time, the CustomPropertyToolPart looks for the ResourcesAttribute class. If found, the CustomPropertyToolPart iterates through the LoadResource method (you must override this method) with the resource values from the ResourcesAttribute. If the resource cannot be found, the CustomPropertyToolPart user interface is built with the default values. Otherwise, the CustomPropertyToolPart user interface is built with the localized values. The Microsoft .NET Framework will only provide localization values for the Property label, descriptions, and Category label. The base property name will not be localized. If the ResourcesAttribute class is not defined, the CustomPropertyToolPart user interface will revert back to the non-localized metadata (that is, CategoryAttribute, DescriptionAttribute, FriendlyNameAttribute, and the internal name of the property).

The following code example demonstrates how to localize your custom property when displayed in the CustomPropertyToolPart user interface.

No code example is currently available or this language may not be supported.

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