Wednesday, January 25, 2012

Cross-thread operation not valid in WPF


Elegant solution to commonly encountered issue:

this.Dispatcher.Invoke((Action)(() =>
            {
                //add your cross-threads operations here for example
                //richTextBoxOut.AppendText(text);
            }));

No comments:

Post a Comment