<?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: Set Map Height/Width to Auto in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/set-map-height-width-to-auto/m-p/431915#M11157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Assuming you have put your map on Canvas, you can catch the Size_Changed Event for the canvas.In it, you can try something like below;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MyMap.Width = this.Width;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MyMap.Height = this.Height;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sanjay J.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Sep 2010 04:53:26 GMT</pubDate>
    <dc:creator>SanajyJadhav</dc:creator>
    <dc:date>2010-09-11T04:53:26Z</dc:date>
    <item>
      <title>Set Map Height/Width to Auto</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/set-map-height-width-to-auto/m-p/431914#M11156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In trying to get a Silverlight 4 application with printing, I've had to fiddle with my layout on the PrintPage Event.&amp;nbsp; The biggest issue being the map's width (800 seems to be the magic number to print on a 8.5x11 sheet of paper).&amp;nbsp; I have no issue shrinking it down (using a MaintainExtentBehavior to make sure all the grpahics stay on the page), but I do have a problem in expanding it back to full size.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, I'm setting it back to a hard value of 1200, but this is no ideal since many of my users have different monitors and use different resolutions.&amp;nbsp; Plus, having a set number isn't friendly for resizing the browser.&amp;nbsp; I've seen where a FrameworkElement can have it's Height and Width set to "Double.NaN" in order to take up all available space and this does indeed work.&amp;nbsp; I use it for a DataGrid in the same application.&amp;nbsp; However, this does not work for the Map control.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there another way that I can get the desired result?&amp;nbsp; This is pretty much the only thing keeping the application from being finished.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 18:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/set-map-height-width-to-auto/m-p/431914#M11156</guid>
      <dc:creator>WilliamKimrey</dc:creator>
      <dc:date>2010-09-10T18:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Map Height/Width to Auto</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/set-map-height-width-to-auto/m-p/431915#M11157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Assuming you have put your map on Canvas, you can catch the Size_Changed Event for the canvas.In it, you can try something like below;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MyMap.Width = this.Width;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MyMap.Height = this.Height;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sanjay J.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Sep 2010 04:53:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/set-map-height-width-to-auto/m-p/431915#M11157</guid>
      <dc:creator>SanajyJadhav</dc:creator>
      <dc:date>2010-09-11T04:53:26Z</dc:date>
    </item>
  </channel>
</rss>

