Hello, I want to create a new Canvas in another thread. For this I create a new thread and set the apartmentstate to STA.
The new thread then creates the Canvas and stores it in a static generic dictionary (so that another thread might access the Canvas and make modifications to it).
In the thread I use a lock on the dictionary and then add the new Canvas. But the problem is that when I try to retrieve the Canvas from the dictionary in another thread and perform an operation on it I get; "cannot modify because the calling thread is not the owning thread" (or similar).
What am I doing wrong