Is it possible to create a borderless UWP application?

五迷三道 提交于 2021-02-18 19:36:38

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!