Get current theme on application launch - Windows Phone 7

I want to see what the current theme is in Windows Phone 7 so that I can change our text, image and color based on the current theme.

For example, if the current theme is yellow, I will change the entire color of the image to yellow.

+4
source share
2 answers

You can access the current theme resource using the following code:

Application.Current.Resources["<ThemeResourceName>"] 

Available topic resource names are listed here . The result of the above operation should be attributed to the corresponding type; for example, if you are extracting PhoneAccentBrush , you must pass the result to SolidColorBrush .

+4
source

Writing a theme for Silverlight applications for Windows Phone 7 is pretty well described on this page: http://dotneteers.net/blogs/vbandi/archive/2010/09/14/being-theme-aware-in-windows-phone-7 -silverlight-apps.aspx

+3
source

Source: https://habr.com/ru/post/1333144/


All Articles