Graphics Layer inaccessible by background thread

Discussion created by dipinbehl on Jan 16, 2012
Latest reply on Jul 10, 2013 by MBranscomb-esristaff
Hi All,

I am using ArcGis API for WPF in a desktop based application to show locations, route for the stops on a 2D Map.
A background thread fetches the locations (along with lat-long) from a WCF service. Then these locations are displayed on the Map as TextSymbol(s) on a GraphicLayer.
Then another background thread calls a WCF RESTfull resource to find route for the locations (stops). This call returns me a route which i am trying to display on the map using another GraphicLayer using 'Add' method of the 'Graphics' property of the layer. Whenever i try to do so, i get an exception 'The calling thread cannot access this object because a different thread owns it.'
I have tried to use Dispatcher object for the screen, the map object, the graphics layer but none seems to work for me.