【发布时间】:2020-04-16 09:14:02
【问题描述】:
我在 MainPage.xaml.cs 中使用以下代码在 TitleBar 上添加了亚克力效果
public void AcrylicTitleBar()
{
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
var title = ApplicationView.GetForCurrentView();
title.TitleBar.ButtonBackgroundColor = Colors.Transparent;
title.TitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
title.TitleBar.ButtonForegroundColor = (Color)Resources["SystemBaseHighColor"];
}
但我不知道为什么 TitleBar 标题不见了。
如果我删除上面的代码,TitleBar 标题就会回来。有人可以帮帮我吗?
【问题讨论】:
-
请将代码发布为文本,而不是图像。