Hi Martin and JSW W.,
I guess you are creating the documents in a separate thread.
If so, please, try to check whether invoke is required when you are creating it, because the UI suite is not thread safe.
You can create the document by the following way:
private
void CreateUIDoc(){
if (InvokeRequired) {
Invoke(
new MethodInvoker(CreateUIDoc)); return; }
ctlWatchList m_ctlWatchList = new ctlWatchList(this) { Dock = DockStyle.Fill }; NUIDocument docWatchList = new NUIDocument(WatchListTitle, -1, m_ctlWatchList); m_DockManager.DocumentManager.AddDocument(docWatchList);
}
Other option that you can try is to switch off the cross thread check by setting Control.CheckForIllegalCrossThreadCalls to false.
However, the first approach is recommended.
Please, let us know if you still have this problem.
Regards,
Angel Chorbadzhiev.