Export (0) Print
Expand All

FrameworkElementAdapters Class

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

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

public static class FrameworkElementAdapters

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:

NoteNote:

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.

System.Object
  System.AddIn.Pipeline.FrameworkElementAdapters

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

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.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2015 Microsoft