IActivityTemplateFactory Interface

.NET Framework (current version)

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


Creates 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
Available since 4.0
Return to top