<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Making a custom layer serializable in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152144#M3824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've created my own layer type but it's not compatible with the PrintTool. I'm guessing this is because it's not serializable, but the error message in the tool doesn't give much help. My layer type inherits from GraphicsLayer. I've found this information about what the print task needs to perform a print of a layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/ExportWebMap_specification/0154000004w8000000/"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/ExportWebMap_specification/0154000004w8000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is, how do I make my layer serializable? Isn't it enough that it inherits from GraphicsLayer? Is there an example on how to achieve this available somewhere? I've reverse enginereed the JSON under "Syntax for client side graphics" to .NET classes for C# but I don't know how to use them and where. The information I need printed from my custom layer class are just graphics (i.e. geometry, symbols, extent). Is there any way to simply use the functionality from the GraphicsLayer class to achieve what I want? The functionality provided by my layer class is not needed when printing. I've tried casting my layer type as a GraphicsLayer instead to the print task but I can't get it to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now I've solved the problem by simply cloning all graphics from my layer type to a temporary GraphicsLayer, hiding my incompatible layer, and then deleting the temporary layer when the print is finished, but I want something a bit more compatible for the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Johan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2012 12:32:45 GMT</pubDate>
    <dc:creator>JohanCarlsson</dc:creator>
    <dc:date>2012-12-13T12:32:45Z</dc:date>
    <item>
      <title>Making a custom layer serializable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152144#M3824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've created my own layer type but it's not compatible with the PrintTool. I'm guessing this is because it's not serializable, but the error message in the tool doesn't give much help. My layer type inherits from GraphicsLayer. I've found this information about what the print task needs to perform a print of a layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/ExportWebMap_specification/0154000004w8000000/"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/ExportWebMap_specification/0154000004w8000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is, how do I make my layer serializable? Isn't it enough that it inherits from GraphicsLayer? Is there an example on how to achieve this available somewhere? I've reverse enginereed the JSON under "Syntax for client side graphics" to .NET classes for C# but I don't know how to use them and where. The information I need printed from my custom layer class are just graphics (i.e. geometry, symbols, extent). Is there any way to simply use the functionality from the GraphicsLayer class to achieve what I want? The functionality provided by my layer class is not needed when printing. I've tried casting my layer type as a GraphicsLayer instead to the print task but I can't get it to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now I've solved the problem by simply cloning all graphics from my layer type to a temporary GraphicsLayer, hiding my incompatible layer, and then deleting the temporary layer when the print is finished, but I want something a bit more compatible for the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Johan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152144#M3824</guid>
      <dc:creator>JohanCarlsson</dc:creator>
      <dc:date>2012-12-13T12:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Making a custom layer serializable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152145#M3825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are right, custom layers inheriting from GraphicsLayer can't be printed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We'll try enhancing it in a future version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reporting that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 09:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152145#M3825</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-12-14T09:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Making a custom layer serializable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152146#M3826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You are right, custom layers inheriting from GraphicsLayer can't be printed.&lt;BR /&gt;&lt;BR /&gt;We'll try enhancing it in a future version.&lt;BR /&gt;&lt;BR /&gt;Thanks for reporting that.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So there is no way for me to work around this using the information provided in the ExportWebMap specification?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 10:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152146#M3826</guid>
      <dc:creator>JohanCarlsson</dc:creator>
      <dc:date>2012-12-17T10:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Making a custom layer serializable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152147#M3827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately I don't figure out any workaround except rewriting by yourself the webmap serialization but it's not that easy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe, instead of subclassing the GraphicsLayer, you might add the new functionalities you need by using attached properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But it's just my 2cts because I have idea about your need.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 06:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152147#M3827</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-12-21T06:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Making a custom layer serializable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152148#M3828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unfortunately I don't figure out any workaround except rewriting by yourself the webmap serialization but it's not that easy.&lt;BR /&gt;&lt;BR /&gt;Maybe, instead of subclassing the GraphicsLayer, you might add the new functionalities you need by using attached properties.&lt;BR /&gt;But it's just my 2cts because I have idea about your need.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rewriting the webmap serialization is what I'd like to do, but it's above my level. I'll see if this is solvable with attached properties instead. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 07:14:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/making-a-custom-layer-serializable/m-p/152148#M3828</guid>
      <dc:creator>JohanCarlsson</dc:creator>
      <dc:date>2013-01-07T07:14:09Z</dc:date>
    </item>
  </channel>
</rss>

