Uređivanje

Dijeli putem


IActivityTemplateFactory Interface

Definition

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

public interface class IActivityTemplateFactory
public interface IActivityTemplateFactory
type IActivityTemplateFactory = interface
Public Interface IActivityTemplateFactory
Derived

Examples

public sealed class MyDelayActivity : IActivityTemplateFactory  

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

         };  
     }  
 }  

Remarks

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.

Methods

Create(DependencyObject)

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

Applies to