小智 5
当我测试流畅的设计系统时,它也发生在我身上!
重现问题。只需添加
// Extend acrylic
extendAcrylicIntoTitleBar(); to OnLaunched at App.xamel.cs
Run Code Online (Sandbox Code Playgroud)
然后将以下代码添加到App.xamel.cs
/// Extend acrylic into the title bar.
private void extendAcrylicIntoTitleBar()
{
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
ApplicationViewTitleBar titleBar =
ApplicationView.GetForCurrentView().TitleBar;
titleBar.ButtonBackgroundColor = Colors.Transparent;
titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
}
Run Code Online (Sandbox Code Playgroud)
接下来,您需要通过按 Ctrl + 来修复丢失的问题。钥匙。
此时标题栏消失。即使删除extendAcrylicIntoTitleBar()函数也无法解决问题!
如果我删除以下内容,标题栏将再次出现
using Windows.UI;
using Windows.UI.ViewManagement;
using Windows.ApplicationModel.Core;
Run Code Online (Sandbox Code Playgroud)
我不确定这是否是一个问题。这似乎就是流畅设计的工作方式
以上测试是根据
https://learn.microsoft.com/en-us/windows/uwp/design/style/acrylic#tropic-theme-resources完成的
归档时间: |
|
查看次数: |
1420 次 |
最近记录: |