Answers for "Acrylic UWP Title bar C#"

C#
0

Acrylic UWP Title bar C#

var view = ApplicationView.GetForCurrentView();

            var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
            coreTitleBar.ExtendViewIntoTitleBar = true;

            // 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;
Posted by: Guest on October-19-2021

C# Answers by Framework

Browse Popular Code Answers by Language