开发者

Application.Current.Resources empty in ScheduledTaskAgent?

I want to regenerate tiles based on external changes in my ScheduledTaskAgent.

开发者_运维问答

I am calling the same code that I use in my app. This code makes use of some resources defined in Application.Current.Resources, and this collection is empty when used from the ScheduledTaskAgent.

Does anyone know of a way to force this collection to be loaded, or am I going to have to manually create my brushes, etc?


Background agents run in the background (hence the name) and do not fully load your application (from a UI perspective at least), hence the empty Resources collection.

Given the background nature of these tasks, it would seem strange that you would need access to these resources, though. Perhaps if you explain your scenario a little further so we can provide more help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜