[英]WINUI 3 Window Border Color
I would like to know how to set the color of the main window in a WINUI 3 C# application.我想知道如何在WINUI 3 C# 应用程序中设置主 window 的颜色。 By default, it matches whatever theme color is applied to the Windows computer.
默认情况下,它匹配应用于 Windows 计算机的任何主题颜色。 In this example, it is a purple color.
在这个例子中,它是紫色的。 Can I set/override this color with a specific color of my own?
我可以用我自己的特定颜色设置/覆盖这种颜色吗?
I don't think it's possible "for the moment".我认为“暂时”不可能。
I tried overriding the ThemeResources but it only applied to the controls inside the app not its window border.我尝试覆盖 ThemeResources 但它仅适用于应用程序内部的控件而不适用于其 window 边框。 But there is a discussion on GitHub to make the app window borderless , so there's a chance that they make it possible to change the border color.
但是在 GitHub 上有一个关于使应用程序 window无边框的讨论,因此他们有可能更改边框颜色。
https://github.com/microsoft/microsoft-ui-xaml/issues/1247 https://github.com/microsoft/microsoft-ui-xaml/issues/1247
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.