Skip to content

Commit f6c1336

Browse files
committed
airspace heading
1 parent d067eec commit f6c1336

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

  • microsoft-edge/webview2/release-notes

microsoft-edge/webview2/release-notes/index.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,21 @@ For full API compatibility, this Prerelease version of the WebView2 SDK requires
7676
<!-- ------------------------------ -->
7777
#### Experimental APIs
7878

79-
8079
The following Experimental APIs have been added in this Prerelease SDK.
8180

8281

8382
<!-- ---------- -->
84-
###### WPF Airspace - WebView2CompositionControl
85-
86-
<!-- temp link for background info: [PR 4804](https://github.com/MicrosoftEdge/WebView2Feedback/pull/4804/files) -->
87-
88-
The `WebView2CompositionControl` solves the following issue: The WebView2 control is always the top-most layer in the WPF app, obscuring any WPF elements.
89-
90-
If you are building a Windows Presentation Foundation (WPF) app and using the WebView2 control, you may find that your app runs into "airspace" issues, where the WebView2 control will always show up on top and hide any WPF elements in the same location, even if you try to specify the WPF elements to be above the WebView2 control (using visual tree order or the z-index property, for example).
83+
###### Show WPF elements on top of the WebView2 layer (WebView2CompositionControl)
9184

92-
This issue stems from the fact that our WPF control uses the WPF HwndHost to host the Win32 WebView2 control, and HwndHost has a long-standing issue with airspace. This issue has existed for over a decade, and you can read more about in-depth efforts to fix it in general in WPF; see [Mitigating Airspace Issues In WPF Applications](https://dwayneneed.github.io/wpf/2013/02/26/mitigating-airspace-issues-in-wpf-applications.html).
93-
94-
`Microsoft.Web.WebView2.Wpf.WebView2CompositionControl` is a drop-in replacement for the standard WPF WebView2 control. Both the WebView2 control and `WebView2CompositionControl` implement the `Microsoft.Web.WebView2.Wpf.IWebView2` interface. Both of them derive from `FrameworkElement`, as follows:
85+
The `WebView2CompositionControl` prevents the WebView2 control from being the topmost layer in a WPF app and obscuring any WPF elements. `Microsoft.Web.WebView2.Wpf.WebView2CompositionControl` is a drop-in replacement for the standard WPF WebView2 control. Both the WebView2 control and `WebView2CompositionControl` implement the `Microsoft.Web.WebView2.Wpf.IWebView2` interface. Both of them derive from `FrameworkElement`, as follows:
9586
* `FrameworkElement` -> `HwndHost` -> `WebView2`.
9687
* `FrameworkElement` -> `Control` -> `WebView2CompositionControl`.
9788

89+
Background: If you're building a Windows Presentation Foundation (WPF) app and using the WebView2 control, you may find that your app runs into "airspace" issues, where the WebView2 control is always displayed on top, hiding any WPF elements in the same location, even if you try to specify the WPF elements to be above the WebView2 control (using visual tree order or the z-index property, for example).
90+
91+
This issue occurs because the WPF control uses the WPF `HwndHost` to host the Win32 WebView2 control, and `HwndHost` has an issue with airspace; see [Mitigating Airspace Issues In WPF Applications](https://dwayneneed.github.io/wpf/2013/02/26/mitigating-airspace-issues-in-wpf-applications.html).
92+
<!-- [PR 4804: WPF Airspace - WebView2CompositionControl](https://github.com/MicrosoftEdge/WebView2Feedback/pull/4804/files) -->
93+
9894
##### [.NET/C#](#tab/dotnetcsharp)
9995

10096
* [CoreWebView2ControllerOptions.DefaultBackgroundColor Property](/dotnet/api/microsoft.web.webview2.core.corewebview2controlleroptions.defaultbackgroundcolor?view=webview2-dotnet-1.0.3079-prerelease&preserve-view=true)

0 commit comments

Comments
 (0)