Reputation: 510
In my background agent I try to get the current accent color:
SolidColorBrush brush = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush;
But I get "App doesn't exist in the current context". And I can't resolve it.
Upvotes: 1
Views: 179
Reputation: 7122
You should use IsolatedStorage
for sharing such data. In the application itself, write the current accent brush color to the isolated storage and access it in the backround agent.
Upvotes: 1