I am developing a windows phone 8.1 (silverlight) app and I need to change background color according to phone's theme. One way that I found is
Background="{StaticResource PhoneAccentBrush}"
But it is required to restart the app when theme is changed. I want to reflect without restarting app.
I went through JAYWAY Windows Phone 8.1 for Developers – Theme resources and found
Background="{ThemeResource SystemColorControlAccentColor}"
When I inserted this line in my page, Visual Studio shows me following errors
- The name "ThemeResource" does not exist in the namespace "http://schemas.microsoft.com/client/2007"
- The type 'ThemeResource' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
So, is it any way to use ThemeResource in windows phone 8.1 silverlight or any equivalent to ThemeResource?
P.S.: I am using Visual Studio 2013 Professional.