C# 带有Fluent设计系统的标题栏-UWP应用程序
我正在使用Fluent Design System开发一个新的UWP应用程序,我希望我的背景是丙烯酸材料,我正在使用C# 带有Fluent设计系统的标题栏-UWP应用程序,c#,uwp,uwp-xaml,fluent-design,C#,Uwp,Uwp Xaml,Fluent Design,我正在使用Fluent Design System开发一个新的UWP应用程序,我希望我的背景是丙烯酸材料,我正在使用我的UWP应用程序的标题栏是透明的(使用Fluent Design System),我正在使用: var coreTitleBar = CoreApplication.GetCurrentView().TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; 但是最小化、最大化和关闭的接口并没有变得透明,为什么 我希望我的应用程序
我的UWP应用程序的标题栏是透明的(使用Fluent Design System),我正在使用:
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.ExtendViewIntoTitleBar = true;
但是最小化、最大化和关闭的接口并没有变得透明,为什么
我希望我的应用程序的标题栏与Windows 10计算器相同 您可以使用
ApplicationViewTitleBar
类的属性执行此操作:
var view = ApplicationView.GetForCurrentView();
// active
view.TitleBar.BackgroundColor = Color.FromArgb(255, 8, 87, 180);
view.TitleBar.ForegroundColor = Colors.White;
// inactive
view.TitleBar.InactiveBackgroundColor = Color.FromArgb(255, 8, 87, 180);
view.TitleBar.InactiveForegroundColor = Colors.Black;
// button
view.TitleBar.ButtonBackgroundColor = Color.FromArgb(255, 8, 87, 180);
view.TitleBar.ButtonForegroundColor = Colors.White;
view.TitleBar.ButtonHoverBackgroundColor = Colors.Blue;
view.TitleBar.ButtonHoverForegroundColor = Colors.White;
view.TitleBar.ButtonPressedBackgroundColor = Colors.Blue;
view.TitleBar.ButtonPressedForegroundColor = Colors.White;
view.TitleBar.ButtonInactiveBackgroundColor = Colors.DarkGray;
view.TitleBar.ButtonInactiveForegroundColor = Colors.Gray;
文件参考:
您可以使用
ApplicationViewTitleBar
类的属性执行此操作:
var view = ApplicationView.GetForCurrentView();
// active
view.TitleBar.BackgroundColor = Color.FromArgb(255, 8, 87, 180);
view.TitleBar.ForegroundColor = Colors.White;
// inactive
view.TitleBar.InactiveBackgroundColor = Color.FromArgb(255, 8, 87, 180);
view.TitleBar.InactiveForegroundColor = Colors.Black;
// button
view.TitleBar.ButtonBackgroundColor = Color.FromArgb(255, 8, 87, 180);
view.TitleBar.ButtonForegroundColor = Colors.White;
view.TitleBar.ButtonHoverBackgroundColor = Colors.Blue;
view.TitleBar.ButtonHoverForegroundColor = Colors.White;
view.TitleBar.ButtonPressedBackgroundColor = Colors.Blue;
view.TitleBar.ButtonPressedForegroundColor = Colors.White;
view.TitleBar.ButtonInactiveBackgroundColor = Colors.DarkGray;
view.TitleBar.ButtonInactiveForegroundColor = Colors.Gray;
文件参考:
非常感谢你!我需要完整的代码来将背景按钮(最小化、最大化和关闭)设置为透明吗?如果你只想让三个按钮透明,你可以使用view.TitleBar.ButtonBackgroundColor=Colors.transparent@fernandousaaa如果你想感谢某人,那么你应该接受他的回答,也就是说,将他的回答标记为有帮助。非常感谢!我需要完整的代码来将背景按钮(最小化、最大化和关闭)设置为透明吗?如果你只想让三个按钮透明,你可以使用view.TitleBar.ButtonBackgroundColor=Colors.transparent@fernandousaaa如果你想感谢某人,那么你应该接受他的回答,也就是说,将他的回答标记为有帮助。