.netwpfinteropwinforms-interop

.net 4.6 and 4.7 already out... still no airspace fix for wpf hosting classic hwnd window?


I integrated OpenSceneGraph in a WPF application. Thus OSG renders on the classic HWND and in that time the previous versions of .net had airspace problems when using a hwndhost (like winformshost) for having a handle. Thus I was forced to create some "write backbuffer to image and display on bitmap in memory" routine because bitmap can be integrated easy with wpf without airspace problems. Well, not the fastest but works...

However, there were rumours in the early previous of .net 4.6 that had a switch (IsRedirected, CompositionMode) that can be enabled to magically solve the problem... sadly, this switch did not apear in the release of 4.6.

Is there some change or release now that includes a solution to fix the interop airspace problems?


Solution

  • .NET 4.5 beta had this feature, but it was removed...

    As noted in an earlier answer by Glenn Slayden on a similar question, the feature will not be included in any future releases:

    Microsoft .NET Framework 4.5 Beta Readme

    1.3.10 Windows Presentation Foundation (WPF)

    1.3.10.1 HwndHost feature has been removed from WPF in the .NET Framework 4.5 Beta

    The .NET Framework 4.5 Developer Preview included a WPF HwndHost redirection feature. However, this feature had several known issues and has been removed from the .NET Framework 4.5 Beta. It will not be included in any future releases.

    To resolve this issue:

    No workaround is available.