Assembly: System.Windows.Presentation (in System.Windows.Presentation.dll)
Windows Presentation Foundation (WPF) extends the Microsoft .NET Framework add-in model to allow WPF UIs to be passed between host applications and add-ins. WPF requires that the WPF UIs that are passed either directly or indirectly derive from FrameworkElement. However, add-ins and host applications are typically run in separate application domains and are, consequently, separated by an isolation boundary. For this reason, the .NET Framework add-in model requires the types that are passed across the isolation boundary to be remotable. A remotable type conforms to one of the following:
Implements the ISerializable interface.
Has the SerializableAttribute attribute applied.
Derives from the MarshalByRefObject class.
For more details on Microsoft .NET Framework remoting, see .NET Framework Remoting Overview.
FrameworkElement is not remotable and must be converted to a remotable type before it is passed across the isolation boundary between an add-in and a host application. For this purpose, you need to call the static ViewToContractAdapter method to convert the FrameworkElement to an instance of the remotable INativeHandleContract.
Once the INativeHandleContract is passed across the isolation boundary, it must be converted to a type that can be displayed by the host application or the add-in. In this case, the static ContractToViewAdapter method is called to convert an INativeHandleContract to a FrameworkElement.
For more detailed exposition of WPF add-ins, see Windows Presentation Foundation Add-Ins Overview.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.