Export (0) Print
Expand All

ActivityTemplate class

This object, member, or enumeration is deprecated and is not intended to be used in your code.  SharePoint 2013 includes the following APIs for working with feeds: .NET client, JavaScript, REST, and server. See Work with social feeds in SharePoint 2013 to choose the API for your specific feed-related programming tasks.  

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

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

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

[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class ActivityTemplate

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

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

Community Additions

ADD
Show:
© 2014 Microsoft