I was wondering if, when calling Dispatcher.Invoke, the calling thread would wait until the dispatcher finished its operation or not...?
For example:
new Thread(() =>
{
string x = "Yes.";
// Invoke the dispatcher.
Dispatcher.Invoke((Action)delegate()
{
// Get the string off a UI element which contains the text, "No."
x = textBox.Text;
});
// Is x either ("Yes" or "No") here, or always "No"?
}).Start();