<?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 Re: Newbie Question in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376239#M9707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perhaps it is the Map.Layers portion causing the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the name of your Map in xaml is it "Map"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map x:Name="MyMap" .......&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the call would be like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;stopsGraphicsLayer = TryCast(MyMap.Layers("MyStopsGraphicsLayer"), GraphicsLayer)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2011 11:55:45 GMT</pubDate>
    <dc:creator>MichaelKohler</dc:creator>
    <dc:date>2011-12-16T11:55:45Z</dc:date>
    <item>
      <title>Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376233#M9701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am a student in the GIS program here in Salmon Arm, Canada. I am trying to replicate the Network Analyst Route Sample in my map project. I've created an arcmap with a network dataset and published with ArcGIS Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've copied and pasted the .xaml code from the example into notepad, changed the url to my map location and pasted that below what I've been calling the "Map Load" sequence. The error: multiple root elements comes up when I run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to nest the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;UserControl x:Class="ArcGISSilverlightSDK.Routing" sequence from the example within the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;UserControl x:Class="ModIIISilverlight.MainPage" sequence but the error list then tells me the &amp;lt;UserControl x:Class="ArcGISSilverlightSDK.Routing" must be a root element.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please give me a little direction?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Blair&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 17:15:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376233#M9701</guid>
      <dc:creator>BlairOrr</dc:creator>
      <dc:date>2011-12-15T17:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376234#M9702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you create a new Silverlight Application, you will get something like this. Only overwrite the highlighted text in red. You don't want to replace x:Class, xmlns, xmlns:x. Copy from xmlns:esri instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;UserControl x:Class="SilverlightApplication1.MainPage"
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
&amp;nbsp;&amp;nbsp;&amp;nbsp; mc:Ignorable="d"
&amp;nbsp;&amp;nbsp;&amp;nbsp; d:DesignHeight="300" d:DesignWidth="400"&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;
&amp;lt;/UserControl&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:23:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376234#M9702</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-12T16:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376235#M9703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Holy Cow! Thank you very much for such a quick response! I followed your advice as well as copied and pasted the "code behind VB" into my MainPage.xaml.vb page. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This process left me with a wack of error messages which I have largely sorted out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now down to 3 errors like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Error: Reference to a non-shared member requires an object reference. D:\inetpub\wwwroot\ModIIISilverlight\ModIIISilverlight\MainPage.xaml.vb 15 38 ModIIISilverlight&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which relate to lines like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stopsGraphicsLayer = TryCast(Map.Layers("MyStopsGraphicsLayer"), GraphicsLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and 1 error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error:&amp;nbsp;&amp;nbsp;&amp;nbsp; Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified. D:\inetpub\wwwroot\ModIIISilverlight\ModIIISilverlight\MainPage.xaml 1 1 ModIIISilverlight&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These 2 error types have me stymied. Would you be able to respond with a suggestion or two and also a bit of an explanation? This is a massive learning experience for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Blair&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 18:59:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376235#M9703</guid>
      <dc:creator>BlairOrr</dc:creator>
      <dc:date>2011-12-15T18:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376236#M9704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, I sorted out the:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified. D:\inetpub\wwwroot\ModIIISilverlight\ModIIISilverlight\MainPage.xaml 1 1 ModIIISilverlight&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and am now just left with the 3:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: Reference to a non-shared member requires an object reference. D:\inetpub\wwwroot\ModIIISilverlight\ModIIISilverlight\MainPage.xaml.vb 15 38 ModIIISilverlight&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could it be they, too require a reference be added? If so, each error is specifically related to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MyRouteGraphicsLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MyRouteTask&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Map.SpatialReference&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Respectively. Are you able to point me in the correct direction for them?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 20:28:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376236#M9704</guid>
      <dc:creator>BlairOrr</dc:creator>
      <dc:date>2011-12-15T20:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376237#M9705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below are two of the lines of code which are generating the errors noted in the prior message. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;stopsGraphicsLayer = TryCast(Map.Layers("MyStopsGraphicsLayer"), GraphicsLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;routeGraphicsLayer = TryCast(Map.Layers("MyRouteGraphicsLayer"), GraphicsLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error appears to generated concerning the Map.Layers portion as intellisense does not recognize it. Rather, it generates a Map.LayersProperties object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts as to why?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Blair&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 20:55:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376237#M9705</guid>
      <dc:creator>BlairOrr</dc:creator>
      <dc:date>2011-12-15T20:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376238#M9706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Likely the error is coming from the way you defined the layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you look at the&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm"&gt; interactive samples&lt;/A&gt;&lt;SPAN&gt;?, there are lot of samples (even in VB) that should be useful to begin with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 06:00:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376238#M9706</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-12-16T06:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376239#M9707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perhaps it is the Map.Layers portion causing the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the name of your Map in xaml is it "Map"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map x:Name="MyMap" .......&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the call would be like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;stopsGraphicsLayer = TryCast(MyMap.Layers("MyStopsGraphicsLayer"), GraphicsLayer)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 11:55:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376239#M9707</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2011-12-16T11:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376240#M9708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kindly check that your project references ESRI.ArcGIS.Client. I assume you were able to get rid of System.Runtime.Serialization error, by adding this reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also when copying code-behind, you need not replace your namespace, class name and constructor. You just copy the using or imports statements and code after InitializeComponent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 19:57:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376240#M9708</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-12-16T19:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376241#M9709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you all for your responses. I have referenced ESRI.ArcGIS.Client yet continue to have the System.Runtime.Serialization error refering to line 1, Column 1. I obviously do not understand how to write the "x:Class="__________" correctly. If I am understanding what I am looking at, is this not the line which refers this silverlight main page to my ArcGIS Server published map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Blair&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Dec 2011 21:53:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376241#M9709</guid>
      <dc:creator>BlairOrr</dc:creator>
      <dc:date>2011-12-17T21:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376242#M9710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/2300-System.Runtime.Serialization-Version"&gt;http://forums.arcgis.com/threads/2300-System.Runtime.Serialization-Version&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This MSDN doc might help understanding x:Class &lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc189082%28v=vs.95%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc189082%28v=vs.95%29.aspx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 20:14:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question/m-p/376242#M9710</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-12-19T20:14:56Z</dc:date>
    </item>
  </channel>
</rss>

