[WPF]Dispatcherで別スレッドからUIアクセス

if (mycontrol.Dispatcher.CheckAccess()) {
mycontrol.Content = "test";
}
else {
mycontrol.Dispatcher.Invoke((Action)(() =>
{
mycontrol.Content = "test";
}));
}
if (mycontrol.Dispatcher.CheckAccess()) {
mycontrol.Content = "test";
}
else {
mycontrol.Dispatcher.Invoke((Action)(() =>
{
mycontrol.Content = "test";
}));
}