I am retrieving a xaml string from a database and constructing a xaml canvas.
The call
loadedCanvas = (Canvas)System.Windows.Markup.XamlReader.Parse(xamlTemplate);
works fine from the UI thread. When I try to do the same thing from a BackgroundWorker thread I get a XamlParseException with the message 'Cannot create unkown type Canvas' pointing to the first Canvas tag.
The xaml is the same in both cases.
I get the feeling that I'm missing something blindingly obvious.