DumpPanel from Task gives exception
This is a follow-up to previous efforts to dump output to new panels. With that in mind, I've tried to enhance the code for use in multi-thread environments (my ultimate use case scenario). Calling this code the first time things work as expected. LINQPad shifts focus to the new output panel. Everything displays as expected when it's expected to do so.
Running the code a second time I get an exception reported, but nothing concrete to track down specifically where it's happening. The Output panel is empty of any content. The specified output panel still contains the output (and at the timing indicated by the test code), but LINQPad does not swap over to it. Looking for insight on what I need to change.
I totally get I'm attempting to use a disposed component. I'm not sure why it's attempting to use a disposed component. Is this a case of the "old" output panel isn't cleaned up prior to attempting to use it on the second run? Closing the output panel manually doesn't result in this exception and seems to suggest this is the case.