WorkerThreadElementContainer Class

This class is used to connect the UI elements in worker threads to Main Window.

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)


Public MustInherit Class WorkerThreadElementContainer _
    Inherits FrameworkElement
‘사용 방법
Dim instance As WorkerThreadElementContainer
public abstract class WorkerThreadElementContainer : FrameworkElement
public ref class WorkerThreadElementContainer abstract : public FrameworkElement
type WorkerThreadElementContainer =  
        inherit FrameworkElement
public abstract class WorkerThreadElementContainer extends FrameworkElement


One key thing for this class is that, communications between main thread and worker thread are always accomplished with Dispatcher.BeginInvoke instead of Dispatcher.Invoke because sometimes these threads can run into deadlock situations as latter call wouldn't return unless Dispatcher processes it. For example first arrange pass of the main thread UI would cause the worker thread UI to arrange itself as we delegate that to worker thread but then worker thread UI needs to access the data model properties which is handled by the across thread COM calls via window messages.

Inheritance Hierarchy


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


WorkerThreadElementContainer Members

Microsoft.VisualStudio.PlatformUI Namespace