<?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: Cannot create an instance of ... in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367863#M9477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jenniffer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;after commenting out &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //_Map.MouseClick += _Map_MouseClick;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the constructor, the user control dialog displays on the MainPage.xaml.&amp;nbsp; Many thanks to you for your many times of quick and effective help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaning&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Oct 2010 17:52:56 GMT</pubDate>
    <dc:creator>ShaningYu</dc:creator>
    <dc:date>2010-10-20T17:52:56Z</dc:date>
    <item>
      <title>Cannot create an instance of ...</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367859#M9473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I used one of ESRI's template, and loaded multiple user control components.&amp;nbsp; One component was from ESRI's sample: DriveTime, &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DriveTimes"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DriveTimes&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, in the Main.xaml file, I use the following code to create the instance:&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;lt;unb:DriveTime x:Name="MyDriveTime" Visibility="Collapsed"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height="110" Width="250" Canvas.Left="18" Canvas.Top="310" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which is the same format as that used to crate multiple other user controls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also checked the class: DriveTime and found nothing wrong.&amp;nbsp; However, when I built it, I got the error message: 'Cannot create an instance of DriveTime'.&amp;nbsp; What's the possible reason for this bug?&amp;nbsp; If you know, please share.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 13:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367859#M9473</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2010-10-20T13:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create an instance of ...</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367860#M9474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's hard to tell what's wrong in your XAML, unbDriveTime, I suspect is your class.&amp;nbsp; I believe you need to add the namespace of your assembly in XAML&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;xmlns:local="clr-namespace:YourNameSpace"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;local:unbDriveTime ..../&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 13:54:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367860#M9474</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-20T13:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create an instance of ...</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367861#M9475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, in all of the classes (including the MainPage.xaml), the namespace is defined: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:local="clr-namespace:UnBlendedCS1_Oct1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, it is OK for&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;lt;local:AddressLocator x:Name="MyAddressLocator" Visibility="Collapsed"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height="300" Width="300" Canvas.Left="278" Canvas.Top="242" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but not for&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;local:DriveTime x:Name="MyDriveTime" Visibility="Collapsed"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height="110" Width="250" Canvas.Left="18" Canvas.Top="310" /&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 14:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367861#M9475</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2010-10-20T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create an instance of ...</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367862#M9476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it a compile time error? Maybe it does not find a constructor to your DriveTime control or it is unable to initialize the contents of your control.&amp;nbsp; There must be something wrong with the control itself then.&amp;nbsp; You can place breakpoint before DriveTime's Initialize to see where it could be failing. Are you able to see its contents in design-time?&amp;nbsp; Sometimes just viewing the design page gives you error messages that you would not see in MainPage but might see in the control you are adding.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:32:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367862#M9476</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-20T15:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create an instance of ...</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367863#M9477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jenniffer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;after commenting out &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //_Map.MouseClick += _Map_MouseClick;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the constructor, the user control dialog displays on the MainPage.xaml.&amp;nbsp; Many thanks to you for your many times of quick and effective help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaning&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 17:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/cannot-create-an-instance-of/m-p/367863#M9477</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2010-10-20T17:52:56Z</dc:date>
    </item>
  </channel>
</rss>

