Select to view content in your preferred language

HELP!!!  Anyone copy/pasted a polygon from one layer to another using silverlight

748
1
07-30-2012 07:40 AM
JoseSanchez
Frequent Contributor
Hi all

Anyone copy/pasted a polygon from one layer to another using Silverlight

thanks
0 Kudos
1 Reply
PreetiMaske
Esri Regular Contributor
Hi all

Anyone copy/pasted a polygon from one layer to another using Silverlight

thanks



This can be done using silverlight too. However you cannot directly add a graphic from one layer to another. You would need to clone the geometry and copy over attributes from LayerAGraphic to LayerBGraphic.

Grpahic LayerBGraphic; = new Graphic();
LayerBGraphic.Geometry=ESRI.ArcGIS.Client.Geometry.Geometry.Clone(layerAGraphic.Geometry);
foreach (var attrib in layerAGraphic.Attributes)
        {
          LayerBGraphic.Attributes[attrib.Key] = attrib.Value;
        }
0 Kudos