Skip to content

[Enhancement] Placing WPF Controls on top of BlazorWebView for a movable / draggable window #1304

Closed
@Hecatron

Description

@Hecatron

Hi,
I've recently been messing with the BlazorWebView with WinForms and WPF
I experimented with trying to remove the default window title bar at the top under WPF
then implementing my own close / maximise / minimise buttons etc inside Blazor which all worked and was awesome

However one stumbling block was implementing the ability to drag / move the window
Typically DragMove() under WPF only works when you're clicking on a WPF control and not the BlazorWebView
So the answer would seem to be to place a invisible WPF region on top of the BlazorWebView control which could be used to drag / move the window around
Currently however I don't think it's possible to place WPF controls above BlazorWebView even using ZIndex

I realise it's still early days yet
But it's fairly awesome to work with and the Blazor code is very simple especially when using MudBlazor controls
Perhaps a custom drag handler would be a different option (which is the way they do it under Chromely)
I figured the maui repo might be the best place for this considering the code was recently moved over

This may be related to
dotnet/aspnetcore#27239
https://github.com/dotnet/aspnetcore/issues/27217

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorBlazor Hybrid / Desktop, BlazorWebView

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions