Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Set Color of Windows App Title Bar

26.12.2020 (👁2725)

Set Color of Windows App Title Bar

 

In Windows UWP Apps kann man die Farbe des Anwendungs Fensters durch die ApplicationView anpassen.

 

Hier der C# Windows UWP Code für eine DarkMode Anwendung

 

        public MainPage()

        {

            this.InitializeComponent();

            //---< set App Title Bar >---

            // Get the instance of the Title Bar

            var appTitelBar = ApplicationView.GetForCurrentView().TitleBar;

            // Set the color of the Title Bar content

            appTitelBar.BackgroundColor = Colors.Black;

            appTitelBar.ForegroundColor = Colors.White;

            // Set the color of the Title Bar buttons

            appTitelBar.ButtonBackgroundColor = Colors.Black;

            appTitelBar.ButtonForegroundColor = Colors.White;

            ////< hide App Bar >

            var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;

            coreTitleBar.ExtendViewIntoTitleBar = false;

            ////</ hide App Bar >

            //---</ set App Title Bar >---

        }