The NeedsManagedWrapperAttribute attribute class defines whether a special wrapper class needs to be provided to be able to use custom interfaces. Special wrapper classes are needed when using custom interfaces inside WPF plugins, because of WPF limitations that block COM interop inside WPF classes.

Use Case

You have to use this attribute when you use custom interfaces to interact with WPF plugins. For example:

    [Plugin, VisualPlugin, NeedsManagedWrapper(typeof(VisualizerWrapper))]
    public partial class Plugin : RemObjects.Hydra.WPF.VisualPlugin, IVisualizerControl

The attribute indicates that the wrapper class should be used to interact with the custom interface, and defines the type of wrapper class that will be used.

The following example shows the wrapper class that will be created by the host to interact with the custom interface:

    public class VisualizerWrapper : VisualPluginWrapper, IVisualizerControl

Note: Please look at the Delphi WPF sample shipped with Hydra to see wrapper classes in action.




Holds the wrapper class type that will be used to interact with the custom interfaces.


property WrapperType: Type read write;


Type WrapperType { get; set; }


Property WrapperType() As Type

Instance Methods


Creates a new instance of the NeedsManagedWrapperAttribute.






Sub New()

constructor (Type)


constructor(wrapperType: Type)


NeedsManagedWrapperAttribute(Type wrapperType)


Sub New(wrapperType As Type)


  • wrapperType: