I am doing a project in Silverlight and I need to copy a GraphicsLayer from a Map to another (the main application Map and a ChildWindow print Map). How can i do this?
From what I noticed, the graphics in a layer is much like a datarow in a datatable. A datarow can only belong to one datatable. Seems like the same applies with a layer and the graphics that belong to it. Here is what I did to copy a layer to another.
Dim gLayer As New GraphicsLayer
gLayer.ID = "Test"
For Each graphic In _selectLayer
Dim g As New Graphic
g.Geometry = graphic.Geometry
g.Symbol = graphic.Symbol
gLayer.Graphics.Add(g)
Next