IActivityTemplateFactory.Create(DependencyObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of the Activity class that represents a predefined design pattern for the specified target object.
public:
System::Activities::Activity ^ Create(System::Windows::DependencyObject ^ target);
public System.Activities.Activity Create (System.Windows.DependencyObject target);
abstract member Create : System.Windows.DependencyObject -> System.Activities.Activity
Public Function Create (target As DependencyObject) As Activity
Parameters
- target
- DependencyObject
The dependency object used by this instance of an IActivityTemplateFactory.
Returns
A workflow Activity.
Examples
Create a template that configures a Delay activity with a duration of ten seconds.
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
Use this to create and configure the activity instances used in a custom activity template.
Applies to
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.