Philippe Maes
Philippe Maes

Reputation: 510

Get accent color from a background agent in WP8

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

Answers (1)

Toni Petrina
Toni Petrina

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

Related Questions