I am writing a namespace extension for windows explorer. In the context of the extension there is no UI thread. So when I create a UI object and cache it to reuse it, I get cross threading exception. I understand why I am getting a cross threading exception but I am not sure how to get around it.
Is there a way I can create my own UI thread and then use that thread to manage the UI objects? I think that'll resolve the issue.
I was able to fix this by writing my own message loop and running the UI from there. In following example, action is the function I call to invoke the UI.