I used this function in a Windows forms
application:
delegate void ParametrizedMethodInvoker5(int arg);
private void log_left_accs(int arg)
{
if (InvokeRequired)
{
Invoke(new ParametrizedMethodInvoker5(log_left_accs), arg);
return;
}
label2.Text = arg.ToString();
}
But in WPF
it doesn't work. Why?
Dispatcher
value to benull
. This is whyDispatcherObject
hasCheckAccess
method, it accounts for this possibility – Flummox