简体   繁体   English

WinUI 3 圆角主 window

[英]WinUI 3 rounded main window

How to make main window with rounded corners?如何制作带圆角的主 window? I had a look on many videos and steps are quite simple.看了很多视频,步骤很简单。

  • check SDK installed enter image description here检查 SDK 已安装在此处输入图片描述
  • create project c# Windows WinUI创建项目 c# Windows WinUI
  • run app - after that a MainWindow appears with rounded corners.运行应用程序 - 之后会出现一个带有圆角的主窗口。

But when project created by me the Mainwindow without rounded corners.但是当我创建的项目没有圆角的主窗口。 enter image description here在此处输入图像描述

Maybe I have to update windows up to 11?也许我必须将 windows 更新到 11?

Maybe I have to update windows up to 11?也许我必须将 windows 更新到 11?

Yes, correct.是,对的。

Only on Windows 11 , the system automatically rounds top-level window corners for most apps as explained in the docs .仅在Windows 11上,系统会自动为大多数应用程序圆顶 window 角,如文档中所述。

The APIs that apply rounded corners are not present in Windows 10 and earlier versions.应用圆角的 API 在 Windows 10 及更早版本中不存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM