<?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: After putting measure action in code, which code show meansure action is complete in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275362#M7171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are right, there is no event raised when MeasureAction is complete. If you notice in the SDK sample, measure is completed when a DoubleClick is detected. This is when graphics are cleared from the map, which might be a good time to re-enable the pan cursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Point lastClick;
private void Map_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
 Point pt = e.GetPosition(null);
 if (Math.Abs(pt.X - lastClick.X) &amp;lt; 2 &amp;amp;&amp;amp; Math.Abs(pt.Y - lastClick.Y) &amp;lt; 2)
 {
&amp;nbsp; //TODO: change cursor here
 }
 lastClick = pt;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:25:19 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2021-12-11T13:25:19Z</dc:date>
    <item>
      <title>After putting measure action in code, which code show meansure action is completed?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275361#M7170</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 have put the measure action in code-behind. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;MyMeasureAction m = new MyMeasureAction();&amp;nbsp; //initialize a MyMeasureAction class
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.MeasureMode = ESRI.ArcGIS.Client.Actions.MeasureAction.Mode.Polygon;&amp;nbsp; //MeasureMode is polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.DisplayTotals = false;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do not display total distance
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.FillSymbol = LayoutRoot.Resources["DrawFillSymbol"] as FillSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.DistanceUnit = ESRI.ArcGIS.Client.Actions.DistanceUnit.Feet;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.MapUnits = ESRI.ArcGIS.Client.Actions.DistanceUnit.Feet;&amp;nbsp; //the unit of the map is Feet
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.Attach(MyMap);&amp;nbsp;&amp;nbsp;&amp;nbsp; //bind this action to MyMap
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.Execute();&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute this action
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I don't know which piece of codes show that the measure action is completed. Dose it exist some function like measreCompleted event? I didn't find it in API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I want to return the cursor to hand shape and return to pan mode after finishing this measure action, I want to know where I can add the codes....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all!:)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 19:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275361#M7170</guid>
      <dc:creator>DanDong</dc:creator>
      <dc:date>2011-02-23T19:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: After putting measure action in code, which code show meansure action is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275362#M7171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are right, there is no event raised when MeasureAction is complete. If you notice in the SDK sample, measure is completed when a DoubleClick is detected. This is when graphics are cleared from the map, which might be a good time to re-enable the pan cursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Point lastClick;
private void Map_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
 Point pt = e.GetPosition(null);
 if (Math.Abs(pt.X - lastClick.X) &amp;lt; 2 &amp;amp;&amp;amp; Math.Abs(pt.Y - lastClick.Y) &amp;lt; 2)
 {
&amp;nbsp; //TODO: change cursor here
 }
 lastClick = pt;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:25:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275362#M7171</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T13:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: After putting measure action in code, which code show meansure action is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275363#M7172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You are right, there is no event raised when MeasureAction is complete. If you notice in the SDK sample, measure is completed when a DoubleClick is detected. This is when graphics are cleared from the map, which might be a good time to re-enable the pan cursor.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Point lastClick;
private void Map_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
 Point pt = e.GetPosition(null);
 if (Math.Abs(pt.X - lastClick.X) &amp;lt; 2 &amp;amp;&amp;amp; Math.Abs(pt.Y - lastClick.Y) &amp;lt; 2)
 {
&amp;nbsp; //TODO: change cursor here
 }
 lastClick = pt;
}
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you Jennifer! I also try to change cursor shape in LayerCollectionChanged event. That also works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:25:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275363#M7172</guid>
      <dc:creator>DanDong</dc:creator>
      <dc:date>2021-12-11T13:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: After putting measure action in code, which code show meansure action is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275364#M7173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You are right, there is no event raised when MeasureAction is complete. If you notice in the SDK sample, measure is completed when a DoubleClick is detected. This is when graphics are cleared from the map, which might be a good time to re-enable the pan cursor.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Point lastClick;
private void Map_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
 Point pt = e.GetPosition(null);
 if (Math.Abs(pt.X - lastClick.X) &amp;lt; 2 &amp;amp;&amp;amp; Math.Abs(pt.Y - lastClick.Y) &amp;lt; 2)
 {
&amp;nbsp; //TODO: change cursor here
 }
 lastClick = pt;
}
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; how to make that graphics would be kept on the maps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:25:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275364#M7173</guid>
      <dc:creator>DidarBultanov</dc:creator>
      <dc:date>2021-12-11T13:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: After putting measure action in code, which code show meansure action is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275365#M7174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is by design that the graphics created by MeasureAction are removed from the map upon completion. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this related thread might help preserve the graphics on the map: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/13902-about-after-using-measure-behavior-the-graph-can-t-stay-in-the-map"&gt;http://forums.arcgis.com/threads/13902-about-after-using-measure-behavior-the-graph-can-t-stay-in-the-map&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 17:43:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/after-putting-measure-action-in-code-which-code/m-p/275365#M7174</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-12-20T17:43:57Z</dc:date>
    </item>
  </channel>
</rss>

