This documentation is archived and is not being maintained.

IActivityTemplateFactory Interface

Defines the factory method that a class implements to create a template that encapsulates "placeholder" Activity objects.

Namespace:  System.Activities.Presentation
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public interface IActivityTemplateFactory

The IActivityTemplateFactory type exposes the following members.

Public methodCreateCreates an instance of the Activity class that represents a predefined design pattern for the specified target object.

Custom activity templates must implement the IActivityTemplateFactory. Custom activity templates are used to customize the configuration of activities, including custom composite activities, so that users do not have to create each of the activities individually and configure all their properties and other settings manually.

   public sealed class MyDelayActivity : IActivityTemplateFactory

        public Activity Create(DependencyObject target)
            return new System.Activities.Statements.Delay
                DisplayName = "DelayActivityTemplate",
                Duration = new TimeSpan(0,0,10)


.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.