Thread MeasureThread = new Thread(delegate()
{
TextBlock tb = new TextBlock();
});
MeasureThread.Start();
This throws an invalid cross thread access exception, even though this particular TextBlock would never be added to the visual tree. I realize that I could probably wrap it with Dispatcher.BeginInvoke, but that seems to defeat the point of using a background thread. I wanted to use this textbox to calculate the height of some text, for 1000+ different texts. I was hoping to be able to do this calculation in a background thread.