DesignerSerializationManager serializationManager = new DesignerSerializationManager();
using (serializationManager.CreateSession())
{
WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer();
rootActivity = (IRootActivity)serializer.Deserialize(serializationManager, stringReaderForXaml);
}
You can use the WorkflowCompiler to compile the XAML file directly along with other .cs/.vb files. Dharma has a sample for compiling and executing workflows at http://www.dharmashukla.com/workflowshell.zip.