Partilhar via


ActivityTemplate Class

Defines the formatting of an ActivityEvent object within a specific locale.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Server.ActivityFeed.ActivityTemplate

Namespace:  Microsoft.Office.Server.ActivityFeed
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class ActivityTemplate
'Usage
Dim instance As ActivityTemplate
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class ActivityTemplate

Remarks

This object is stored in an ActivityTemplatesCollection in ActivityType. Create a new ActivityTemplate by using the Create method in that collection. The IsMultivalued property defines whether the template is set to display links for multiple events instead of one. The TitleFormatLocStringResourceFile property of this class should contain the name of the resource file that contains the localized strings that you are using to display events in an activity feed. The TitleFormatLocStringName property should refer to the name of the entry in your resource file whose value defines the display for a particular event. Values stored in the resource file can insert string properties in the ActivityEvent by placing the name of the property in braces, as in the following example.

<value xml:space="preserve">{Publisher} has created a new community: {Link}</value>

For instructions on how to create a resource file, see Creating Resource Files. For a code sample that uses a resource file, see Microsoft SharePoint Server 2010: Activity Feeds Console Application

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

ActivityTemplate Members

Microsoft.Office.Server.ActivityFeed Namespace