Solution: Invoke it safely:
public void RefreshView()
{
if (this.InvokeRequired)
{
this.Invoke(new UpdateDisplayStateCallback(this.RefreshViewInternally));
}
else
{
this.RefreshViewInternally();
}
}
(RefreshViewsInternally can now contain references to view components you wanted to actually refresh.)
What's that? You want to know how to make your call back method something with parameters? No problem:
public void RefreshViews(ReallyComplexObjectYouCreatedYourself myReallyComplexObjectYouCreatedYourself)
{
if (this.InvokeRequired)
{
this.Invoke(new Action
}
else
{
this.RefreshViewsInternally(myReallyComplexObjectYouCreatedYourself);
}
}
Now, RefreshViewsInternally is allowed to have this signature: RefreshViewsInternally(ReallyComplexObjectYouCreatedYourself myReallyComplexObjectYouCreatedYourself);
Booya.