<?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: Dismiss Customized Content Control and Disable the function? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475575#M12245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used a customized user control (windows Panel). when I put these codes, it tells me i am missing use directive for MyMap. How to fix it? thanks, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you referring to this sample? &lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If yes, you can clear the graphics layer by doing the following:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
GraphicsLayer layer = this.MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (layer != null)
 layer.Graphics.Clear(); // or layer.ClearGraphics();
&lt;/PRE&gt;&lt;BR /&gt;where "MyGraphicsLayer" is the ID of the layer whose graphics you need to clear.&lt;BR /&gt;&lt;BR /&gt;Also to ensure that IdentifyTask is no longer performed on MouseClick, you can either&lt;BR /&gt;* unsubscribe to this event so succeeding MouseClicks do not perform an IdentifyTask, or&lt;BR /&gt;this.MyMap.MouseClick -= QueryPoint_MouseClick;&lt;BR /&gt;&lt;BR /&gt;* use a private boolean to denote if IdentifyTask need to be created and check if that is true/false before performing an IdentifyTask.&lt;BR /&gt;bool identifyTaskEnabled = false; //set to true/false&lt;BR /&gt;private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)&lt;BR /&gt;{&lt;BR /&gt;if (!identifyTaskEnabled ) return; // to skip the code that follows&lt;BR /&gt;... //IdentifyTask code goes here&lt;BR /&gt;}&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:02:05 GMT</pubDate>
    <dc:creator>ducksunlimited</dc:creator>
    <dc:date>2021-12-11T21:02:05Z</dc:date>
    <item>
      <title>Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475573#M12243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a customized content control for Identify tool. How to clear all the graphics and disable the Identify funtion after I dismiss/close the control panel. Appreciate the help, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 13:54:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475573#M12243</guid>
      <dc:creator>ducksunlimited</dc:creator>
      <dc:date>2010-10-04T13:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475574#M12244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you referring to this sample? &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If yes, you can clear the graphics layer by doing the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
GraphicsLayer layer = this.MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (layer != null)
 layer.Graphics.Clear(); // or layer.ClearGraphics();
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;where "MyGraphicsLayer" is the ID of the layer whose graphics you need to clear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also to ensure that IdentifyTask is no longer performed on MouseClick, you can either&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* unsubscribe to this event so succeeding MouseClicks do not perform an IdentifyTask, or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this.MyMap.MouseClick -= QueryPoint_MouseClick;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* use a private boolean to denote if IdentifyTask need to be created and check if that is true/false before performing an IdentifyTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bool identifyTaskEnabled = false; //set to true/false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (!identifyTaskEnabled ) return; // to skip the code that follows&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... //IdentifyTask code goes here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475574#M12244</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T21:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475575#M12245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used a customized user control (windows Panel). when I put these codes, it tells me i am missing use directive for MyMap. How to fix it? thanks, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you referring to this sample? &lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If yes, you can clear the graphics layer by doing the following:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
GraphicsLayer layer = this.MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (layer != null)
 layer.Graphics.Clear(); // or layer.ClearGraphics();
&lt;/PRE&gt;&lt;BR /&gt;where "MyGraphicsLayer" is the ID of the layer whose graphics you need to clear.&lt;BR /&gt;&lt;BR /&gt;Also to ensure that IdentifyTask is no longer performed on MouseClick, you can either&lt;BR /&gt;* unsubscribe to this event so succeeding MouseClicks do not perform an IdentifyTask, or&lt;BR /&gt;this.MyMap.MouseClick -= QueryPoint_MouseClick;&lt;BR /&gt;&lt;BR /&gt;* use a private boolean to denote if IdentifyTask need to be created and check if that is true/false before performing an IdentifyTask.&lt;BR /&gt;bool identifyTaskEnabled = false; //set to true/false&lt;BR /&gt;private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)&lt;BR /&gt;{&lt;BR /&gt;if (!identifyTaskEnabled ) return; // to skip the code that follows&lt;BR /&gt;... //IdentifyTask code goes here&lt;BR /&gt;}&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475575#M12245</guid>
      <dc:creator>ducksunlimited</dc:creator>
      <dc:date>2021-12-11T21:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475576#M12246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"MyMap" in the code I posted is the name of the map from the sample. You might have renamed the map to something else, you should use that name instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 16:25:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475576#M12246</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-05T16:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475577#M12247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;"MyMap" in the code I posted is the name of the map from the sample. You might have renamed the map to something else, you should use that name instead.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think i described the problem clearly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two xaml files - MainPage and WindowPanel. MyMap is in MainPage.xaml, not in WindowPanel.xaml. Now How can i use MyMap control in WindowPanel.xaml.cs file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 16:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475577#M12247</guid>
      <dc:creator>ducksunlimited</dc:creator>
      <dc:date>2010-10-05T16:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475578#M12248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh so MyMap belongs to MainPage.xaml but you need to update it's properties in WindowPanel.xaml. Does WindowPanel contain MainPage? If yes, you probably have something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;local:MainPage x:Name="MainPage"/&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Provide this instance a name so you can access MyMap by using this.MainPage.MyMap...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475578#M12248</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T21:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dismiss Customized Content Control and Disable the function?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475579#M12249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Where to add &amp;lt;local:MainPage x:Name="MainPage"/&amp;gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;appreciate your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Oh so MyMap belongs to MainPage.xaml but you need to update it's properties in WindowPanel.xaml. Does WindowPanel contain MainPage? If yes, you probably have something like:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;local:MainPage x:Name="MainPage"/&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Provide this instance a name so you can access MyMap by using this.MainPage.MyMap...&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dismiss-customized-content-control-and-disable-the/m-p/475579#M12249</guid>
      <dc:creator>ducksunlimited</dc:creator>
      <dc:date>2021-12-11T21:02:11Z</dc:date>
    </item>
  </channel>
</rss>

