I used the XmlWriterRollingTraceListener from here- http://code.google.com/p/toolsdotnet/, but standard XmlWriterTraceListener can be "used" (more on that in the coming entries) as well.

Main points are:

- You set the ActivityId on the Trace.CorrelationManager to your activity Guid (that is persisted in the current thread logical call context). All events logged after that are correlated under this same Guid when flushing events into xml:

<CorrelationActivityID="{XYZ}"/>

- You should log the "Start" event of your activity, otherwise instead of a meaningful activity name in the left pane, you'll see your Guid (part of it).
- You declare a transfer of activity by logging the "Transfer" event with new ActivityId, after that you set that ActivityId on the CorrelationManager.

This is just one of the ways how to achieve the result shown in the screen shot.