<?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: How to combine two ESRI.ArcGIS.Client.Graphic objects? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514356#M13136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As long as you only have a very limited set of features, that shouldn't be a problem. You don't need to repaint. Make sure you only reposition, since this is a lot cheaper than recreating/placing a textbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you listen to the ExtentChanging event and reposition your elements on top of/outside the map, that would be (fairly) cheap (ie don't use Graphics, but use for instance an ItemsControl overlaying the map). This is similar to how the InfoWindow control does it. You can see the sourcecode for that here: &lt;/SPAN&gt;&lt;A href="http://esrisilverlight.codeplex.com/SourceControl/changeset/view/68177#1327535"&gt;http://esrisilverlight.codeplex.com/SourceControl/changeset/view/68177#1327535&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2011 16:14:37 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2011-06-27T16:14:37Z</dc:date>
    <item>
      <title>How to combine two ESRI.ArcGIS.Client.Graphic objects?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514353#M13133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a map and when the user clicks inside, the code creates a red point at the location, and sets a text above this point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like that :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://oi52.tinypic.com/2u5x26x.jpg"&gt;&lt;IMG src="http://oi52.tinypic.com/2u5x26x.jpg" /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
var redPointSymbol = new SimpleMarkerSymbol { Color = new SolidColorBrush { Color = Colors.Red } };
var textSymbol&amp;nbsp; = new TextSymbol { Text = "Point A", FontSize = 15 };
var textPoint = new MapPoint(mapPoint.X, mapPoint.Y + textDistance);
myGraphicsLayer.Graphics.Add(new Graphic { Symbol = redPointSymbol, Geometry = mapPoint});
myGraphicsLayer.Graphics.Add(new Graphic { Symbol = textSymbol , Geometry = textPoint&amp;nbsp; });
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is when I zoom the map.. I want that the distance between the red point and the text will be final. In every zoom level. I created the graphic objects by map coordinates, and therefore when I'm zoom in/out, the distance between them grows up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only solution I can think about, is to set the text Graphic on the original map point, and use OffsetX &amp;amp; OffsetY (for the TextSymbol). It's might be good becaute the offsets work by screen coordinates, but I want to add after that a line that connecting between the point and the text. And for that I must create a polyline by map coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a way to combine those Graphics together? Anyone have an idea to do that? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you guys!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 16:47:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514353#M13133</guid>
      <dc:creator>GalTalmor</dc:creator>
      <dc:date>2011-06-24T16:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two ESRI.ArcGIS.Client.Graphic objects?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514354#M13134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The trick is to only use one graphic, and have both the point and the text in the same symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See this sample: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;If you hover on the dot at Los Angeles, notice the text that pops up. This is part of the symbol. You can tweak the symbol (MapTipLabelMarkerRendderer) so that the label is always showing on by removing the visual state defined in the symbol template, and set the "labelOnHover" object to Visible instead of collapsed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 18:33:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514354#M13134</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-06-24T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two ESRI.ArcGIS.Client.Graphic objects?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514355#M13135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The trick is to only use one graphic, and have both the point and the text in the same symbol.&lt;BR /&gt;See this sample: &lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols&lt;/A&gt;&lt;BR /&gt;If you hover on the dot at Los Angeles, notice the text that pops up. This is part of the symbol. You can tweak the symbol (MapTipLabelMarkerRendderer) so that the label is always showing on by removing the visual state defined in the symbol template, and set the "labelOnHover" object to Visible instead of collapsed.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe control-template is actually the best solution.. I thought to register to ExtentChanging event and repaint the graphic text again over and over.. How much do you think that's may slow my app?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 15:39:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514355#M13135</guid>
      <dc:creator>GalTalmor</dc:creator>
      <dc:date>2011-06-25T15:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two ESRI.ArcGIS.Client.Graphic objects?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514356#M13136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As long as you only have a very limited set of features, that shouldn't be a problem. You don't need to repaint. Make sure you only reposition, since this is a lot cheaper than recreating/placing a textbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you listen to the ExtentChanging event and reposition your elements on top of/outside the map, that would be (fairly) cheap (ie don't use Graphics, but use for instance an ItemsControl overlaying the map). This is similar to how the InfoWindow control does it. You can see the sourcecode for that here: &lt;/SPAN&gt;&lt;A href="http://esrisilverlight.codeplex.com/SourceControl/changeset/view/68177#1327535"&gt;http://esrisilverlight.codeplex.com/SourceControl/changeset/view/68177#1327535&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 16:14:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514356#M13136</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-06-27T16:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two ESRI.ArcGIS.Client.Graphic objects?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514357#M13137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;As long as you only have a very limited set of features, that shouldn't be a problem. You don't need to repaint. Make sure you only reposition, since this is a lot cheaper than recreating/placing a textbox.&lt;BR /&gt;If you listen to the ExtentChanging event and reposition your elements on top of/outside the map, that would be (fairly) cheap (ie don't use Graphics, but use for instance an ItemsControl overlaying the map). This is similar to how the InfoWindow control does it. You can see the sourcecode for that here: &lt;A href="http://esrisilverlight.codeplex.com/SourceControl/changeset/view/68177#1327535"&gt;http://esrisilverlight.codeplex.com/SourceControl/changeset/view/68177#1327535&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 17:44:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-combine-two-esri-arcgis-client-graphic/m-p/514357#M13137</guid>
      <dc:creator>GalTalmor</dc:creator>
      <dc:date>2011-06-27T17:44:02Z</dc:date>
    </item>
  </channel>
</rss>

