Its easy enough if you follow a few rules. Here is an example of a NativeActivity that has a child:
[Designer(typeof(MyActivityDesigner)), ContentProperty("Child")]
public sealed class MyActivity :
NativeActivity, IActivityTemplateFactory
{
public ActivityAction Child { get; set; }
protected override void
CacheMetadata(NativeActivityMetadata metadata)
{
metadata.AddDelegate(Child);
}
protected override void
Execute(NativeActivityContext context)
{
context.ScheduleAction(Child);
}
Activity IActivityTemplateFactory
.Create(System.Windows.DependencyObject target)
{
return new MyActivity
{
Child = new ActivityAction()
};
}
}
. Activity Delegate . -, IActivityTemplateFactory . /, . , ; .
, , , - , , . , .
Child :
<sap:WorkflowItemPresenter
HintText="Add children here!"
Item="{Binding Path=ModelItem.Child.Handler}" />