Create CustomActivity like ForEachActivity

Hey there!

I’m starting with UIPath and need some help…
I built my first robot ( login to a website, grab information, download file, login to another website, place information, upload file).
I built my first library within UIPath.
I built my first library with VisualStudio.
Í am happy with my first activity, made with VisualStudio, but in UIPath it is only a block with some arguments and a resultvalue.
What i want to build is an activity like the ForEach activity.
I want to be able to place other activities inside my activity.

What do i need to change to this sample code to make that possible?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Activities;
using System.ComponentModel;

namespace CustomActivity
public class SimpleFormula : CodeActivity
public InArgument FirstNumber { get; set; }

    public InArgument<double> SecondNumber { get; set; }

    public OutArgument<double> ResultNumber { get; set; }

    protected override void Execute(CodeActivityContext context)
        var firstNumber = FirstNumber.Get(context);
        var secondNumber = SecondNumber.Get(context);
        var result = System.Math.Pow(firstNumber + secondNumber, 2);
        ResultNumber.Set(context, result);