问题
In WPF, we can set WindowStyle
to None
to create a "borderless" window.
But, I found that UWP contains pages only.
Is there any way to have borderless windows in UWP?
回答1:
It's not possible to do the same, however you could make your app go fullscreen or expand its content into title bar so you'll get more place for the content. Another similar thing may be using Picture In Picture mode, but these windows are always above others AFAIK.
Read more about fullscreen in UWP for example here, about expanding the content into title bar here and about the PIP mode here.
回答2:
You can see:CompactOverlay mode – aka Picture-in-Picture – Universal Windows App Model
The first is check whether it can support.
ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay)
And then you can enter it.
bool modeSwitched = await ApplicationView.GetForCurrentView().TryEnterViewModeAsync(ApplicationViewMode.CompactOverlay);
The code in github:https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/MultipleViews
来源:https://stackoverflow.com/questions/44130985/is-it-possible-to-create-a-borderless-uwp-application