<?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 Map Printing Sample with text in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65871#M1650</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;Another question about the map printing sample.&amp;nbsp; I have looked through the forums, but I did not see this topic.&amp;nbsp; I am using the functionality from the "withtext" template in my printing.&amp;nbsp; My issue is that I am trying to make the text dynamic, depending on an identify function.&amp;nbsp; Now the text will only update on the initial load of the print dialog, so when I make multiple maps, the text stays the same for each map.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know which event I could use, or some other way to dynamically update a textblock on the template?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks, Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Feb 2012 21:31:01 GMT</pubDate>
    <dc:creator>ChrisBradberry</dc:creator>
    <dc:date>2012-02-06T21:31:01Z</dc:date>
    <item>
      <title>Map Printing Sample with text</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65871#M1650</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;Another question about the map printing sample.&amp;nbsp; I have looked through the forums, but I did not see this topic.&amp;nbsp; I am using the functionality from the "withtext" template in my printing.&amp;nbsp; My issue is that I am trying to make the text dynamic, depending on an identify function.&amp;nbsp; Now the text will only update on the initial load of the print dialog, so when I make multiple maps, the text stays the same for each map.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know which event I could use, or some other way to dynamically update a textblock on the template?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks, Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 21:31:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65871#M1650</guid>
      <dc:creator>ChrisBradberry</dc:creator>
      <dc:date>2012-02-06T21:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Map Printing Sample with text</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65872#M1651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One option is to hook up an handler to the PageChanged event of your mapPrinter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this handler, you can change the value of your textblock (or more likely, change a property which is binded to your textblock).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To do that, you can use the MapPrinter.DataItems dictionary which is done to add custom infos to the print page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private void mapPrinter_PageChanged(object sender, PageChangedEventArgs e)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; var mapPrinter = sender as MapPrinter;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mapPrinter != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapPrinter.DataItems["MyIdentifyResult"] = MyIdentifyResultFromPage(e.Page); // MyIdentifyResultFromPage to write depending on your context
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then in your print page template you can use this DataItem this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;TextBlock TextWrapping="Wrap"
&amp;nbsp;&amp;nbsp; Text="{Binding DataItems[MyIdentifyResult], RelativeSource={RelativeSource TemplatedParent}}"/&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:32:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65872#M1651</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-10T22:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Map Printing Sample with text</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65873#M1652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried that, but this only fires on load.&amp;nbsp; I put a breakpoint in the sample and it only fired when the dialog loaded.&amp;nbsp; Is there a way to catch the extent change on the map in the dialog?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 14:35:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65873#M1652</guid>
      <dc:creator>ChrisBradberry</dc:creator>
      <dc:date>2012-02-07T14:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Map Printing Sample with text</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65874#M1653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Dominique,&lt;BR /&gt;&lt;BR /&gt;I tried that, but this only fires on load. I put a breakpoint in the sample and it only fired when the dialog loaded. Is there a way to catch the extent change on the map in the dialog?&lt;BR /&gt;&lt;BR /&gt;Chris&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;It's fired every time the page changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I probably misunderstood your issue. I thought your were printing multi pages and that you wanted to change some info by page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to change the text info in your unique printed page, just changing the property should do the trick:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;mapPrinter.DataItems["MyIdentifyResult"] = MyIdentifyResult(); &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Then it's just a matter of binding.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 14:46:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65874#M1653</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-02-07T14:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Map Printing Sample with text</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65875#M1654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am mainly interested in unique maps. Where do I put that code to have it fire with the extent change?&amp;nbsp; The page_changed does not seem to fire with extent change. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 15:21:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65875#M1654</guid>
      <dc:creator>ChrisBradberry</dc:creator>
      <dc:date>2012-02-07T15:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Map Printing Sample with text</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65876#M1655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Dominique,&lt;BR /&gt;&lt;BR /&gt;I am mainly interested in unique maps. Where do I put that code to have it fire with the extent change? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;At first glance, I would say in an handler hooked up to the Map.ExtentChanged event.:)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess too easy answer, there is probably something, I didn't get in your issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have to set the property that is displayed in the print page as soon as its value changes but that's depending on your context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, if you want to display a text with the current extent, you can set this property on Map.ExtentChanged event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to display a result from an identify task (I thought it was your case from your first posts), set the property as soon as you get the identify result...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note : Perhaps the problem is coming that there are 2 maps, one main map in your application and one map used for the printing. You can hook up an handler to this second map by code like : mapPrinter.PrintMap.ExtentChanged += .....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 16:55:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-printing-sample-with-text/m-p/65876#M1655</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-02-07T16:55:14Z</dc:date>
    </item>
  </channel>
</rss>

