dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

Topmost Page #18168

Open bernox89 opened 1 year ago

bernox89 commented 1 year ago

Description

I suggest creating an option for the Windows platform to allow the current page to always be kept in the foreground (top most), as happens for example in Winforms. This option cannot be missed for developing applications on Windows.

Public API Changes

Topmost=true

Intended Use-Case

I'm stuck developing my application, as my scenario forces me to have it available.

mattleibow commented 1 year ago

When using .NET MAUI, you have full access to the native platform features. There is also a nice WinUIEx library (https://github.com/dotMorten/WinUIEx) that adds a collection of useful features to the Windows APIs.

When using that library, you can install it for Windows and then in your window HandlerChanged event, you can maybe do something like this:

WindowManager.Get(this.Handler.PlatformView).SetIsAlwaysOnTop(true);
ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

bernox89 commented 1 year ago

Many thanks, I looked everywhere but couldn't find any information about it. Indeed, in some posts on github I had read some proposals in this sense. In any case I'll try and let you know. Thank you again.