I have successfully managed to implement lockscreen backgrounds into my WP8 application which uses a custom user control and render it as writeable bitmap since I want to have a dynamic lockscreen for example like a weather lockscreen.
I now want to implement a background task to generate this image and check for new weather data but I am unable to use the custom user control I created.
Is there a way I can use my user control in my background task? I have thought of creating a webservice that generates this image and simply the background task will call this service and just retrieve the image. but first I want to check if there is any way I can do it from within the app itself.
Just a guess, given the information you've given: you can't use the usercontrol from the background agent's project because it's declared in the main project?
If so, all you have to do is to create a third project (of type "class library"). Move the usercontrol in that project, along with all the necessary dependencies. Then you can reference this third project from both the main project and the background agent's project.