简体   繁体   中英

How to change StatusBar background on desktop or tablet?

How can I change StatusBar background on desktop or tablet? I can do that on phone but not on other form-factors. I've seen it in new Todoist app for Windows 10. Thank you.

StatusBar does not available for Desktop and Tablet. I guess you meant TitleBar :

var titleBar = ApplicationView.GetForCurrentView().TitleBar;
titleBar.BackgroundColor = new Color() { A = 255, R = 54, G = 60, B = 116 };
titleBar.ForegroundColor = new Color() { A = 255, R = 232, G = 211, B = 162 };
titleBar.InactiveBackgroundColor = new Color() { A = 255, R = 135, G = 141, B = 199 };
titleBar.InactiveForegroundColor = new Color() { A = 255, R = 232, G = 211, B = 162 };

More details look at the sample

Also look at this cool sample

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM