Invoking UI Changes in WPF

By Charlotte

Again another reminder, in WinForms I would have done: private delegate void UpdateUiTextDelegate(Control control, string text); private void UpdateUiText(Control control, string text) { if(InvokeRequired) { Invoke(new UpdateUiTextDelegate(UpdateUiText), new object[] {control, text}); return; } control.Text = text; } Using the same delegate we need to use the Dispatcher.Invoke method – this is (as far as I’m…