FrameworkElementAdapters Class

FrameworkElementAdapters is used by Windows Presentation Foundation (WPF) add-ins to convert between a FrameworkElement and an INativeHandleContract.

System.Object
  System.AddIn.Pipeline.FrameworkElementAdapters

Namespace:  System.AddIn.Pipeline
Assembly:  System.Windows.Presentation (in System.Windows.Presentation.dll)

'Declaration
Public NotInheritable Class FrameworkElementAdapters

The FrameworkElementAdapters type exposes the following members.

  NameDescription
Public methodStatic memberContractToViewAdapterReturns a FrameworkElement that has been converted from an INativeHandleContract.
Public methodStatic memberViewToContractAdapterReturns an INativeHandleContract that has been converted from a FrameworkElement.
Top

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:

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 WPF Add-Ins Overview.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft