Skip to content

Allow use of new WebView2CompositionControl for WPF BlazorWebView #28063

@bwood4

Description

@bwood4

Description

In v1.0.2957.106 of Microsoft.Web.WebView2, the team introduced the WebView2CompositionControl which solves the Airgap issue that prevents WPF controls from overlaying on top of a WebView2 control. It would be really nice to see this change come to BlazorWebView, either as the new default or as on option to select.

Public API Changes

WebView2CompositionControl is intended as a drop-in replacement for WebView2 in WPF, so simply replacing which control is used would result in no API changes, but would result in behavioral changes.

Alternatively a property like

public bool UseCompositionControl { get; set; }

could be added to the BlazorWebView control to allow for an opt-in approach.

Intended Use-Case

There are many use cases for being able to place a WPF control overtop of a BlazorWebView. Notably render-heavy controls that may not work with Blazor Hybrid often offer WPF alternatives that could be used instead with this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions