dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.04k stars 1.16k forks source link

BlazorWebView overlays other ui elements #5459

Closed HeilOliver closed 2 years ago

HeilOliver commented 2 years ago

Problem description: When another UI element should be displayed above the BlazorWebView component the UI element is not displayed When the BlazorWebView is replaced with another UIElement, everything is displayed correctly.

Actual behavior: Other UI element is not shown.

Expected behavior: Other UI element shoud be displayed above BlazorWebView.

Minimal repro:

           <Grid>
                <wpf:BlazorWebView
                    HostPage="wwwroot/index.html"
                    Services="//Some ServiceProvider">

                    <wpf:BlazorWebView.RootComponents>
                        <wpf:RootComponent
                            Selector="#app"
                            ComponentType="{x:Type components:App}" />
                    </wpf:BlazorWebView.RootComponents>
                </wpf:BlazorWebView>

                <Border
                    Background="Blue"
                    VerticalAlignment="Stretch"
                    HorizontalAlignment="Stretch"/>
            </Grid>

In this example, the border should cover the whole WebView.

System Windows 11Pro VS 2022 Prev 4 Net 6 RC1

lindexi commented 2 years ago

@HeilOliver This is the known issues. The BlazorWebView is work as the WinFormsHost

singhashish-wpf commented 2 years ago

@HeilOliver As @lindexi said, BlazorWebView works as WinFormsHost and it displays its own hwnd.

batzen commented 2 years ago

@singhashish-wpf That means i will never be fixed? If that's the case it should be made clear in all documentations that it's a known issue and won't get fixed.

There was a time where MS announced, and as far as i remember, even showcased a WPF version which did not suffer from these "airspace" issues.