Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 views
in Technique[技术] by (71.8m points)

xaml - Windows 8 theme color - accessing it programmatically

In windows 8 consumer preview you can personalize your experience, including setting a 'background color' which is then also used as the background for selected tiles, app bar etc. So selecting orange will mean that orange accents are visible in the Windows 8 Metro UI.

I am currently authoring some custom controls, and I would like to have access to this color in my styling, so as the user changes color so my applications accents are re-colored accordingly.

I cannot find a way of getting at this color in my XAML. It seems reasonable to expect that there is a system-level dynamic brush or color resource that you could reference.

Does anyone have any ideas ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Based on this thread (Start Screen background as my metro apps background) on MSDN - this is not available.

In case the MSDN thread disappears, the site is temporarily unavailable, or Microsoft moves the directory structure around and leaves orphaned links all over the place: The relevant answer there, from Microsoft employee Rob Kaplan, said:

Metro style apps cannot query the start screen background color.

So it can be construed as an official response that this functionality is unavailable.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...