Wait for Invoke to finish

Simplified Example:

string s = "";
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle, new Action(delegate ()
{
    s = "test";
}
return s;

For various reasons I want to do this with a UserControl. How can I wait for the Dispatcher to finish before returning, so instead of "" "test" gets returned?