<?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: ArcGISTiledMapServiceLayer's ServiceUri not binding to View Model's String Property in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497670#M6108</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, glad you were able to crack it! Looks like MVVM Light adds an extra layer of complexity to the binding. &lt;/P&gt;&lt;P&gt;Thanks for posting your solution for others who will (inevitably) run into this problem. &lt;/P&gt;&lt;P&gt;Thad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Oct 2015 17:07:04 GMT</pubDate>
    <dc:creator>ThadTilton</dc:creator>
    <dc:date>2015-10-05T17:07:04Z</dc:date>
    <item>
      <title>ArcGISTiledMapServiceLayer's ServiceUri not binding to View Model's String Property</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497667#M6105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is in regards to ArcGIS Runtime SDK for .NET (WPF) 10.2.6.. I have a ArcGISTiledMapServiceLayer and ArcGISDynamicMapServiceLayer that are attempting to get their ServiceUri from a string property on the View Model but it doesn't work. Other bindings work, even ones that are also string properties. ServiceUri is a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;esri:ArcGISTiledMapServiceLayer ID="Basemap"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceUri="{Binding Path=BasemapUri}"/&amp;gt;

&amp;lt;esri:ArcGISDynamicMapServiceLayer ID="USA" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceUri="{Binding USAUri}"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas as to why this would happen? I'm using MVVM Light. It's a string according to this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/desktop/api-reference//html/P_Esri_ArcGISRuntime_Layers_ArcGISTiledMapServiceLayer_ServiceUri.htm" title="https://developers.arcgis.com/net/desktop/api-reference//html/P_Esri_ArcGISRuntime_Layers_ArcGISTiledMapServiceLayer_ServiceUri.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGISTiledMapServiceLayer.ServiceUri Property&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:52:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497667#M6105</guid>
      <dc:creator>RonVincent</dc:creator>
      <dc:date>2021-12-11T21:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISTiledMapServiceLayer's ServiceUri not binding to View Model's String Property</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497668#M6106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron -&lt;/P&gt;&lt;P&gt;The problem is that elements inside the MapView are not contained in the Page's control hierarchy. If you set a data context for the Page (or Window) it won't be available on things like Map and Layer. Since those things don't inherit from FrameworkElement, they won't be able to use the data context of elements that "contain" them.&lt;/P&gt;&lt;P&gt;If you define the data source explicitly with the binding, it should work as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example of binding a layer's ServiceUri to a property in a ViewModel. The ViewModel has been defined as a static resource in App.xaml.&lt;/P&gt;&lt;P&gt;&amp;lt;esri:ArcGISTiledMapServiceLayer ID="Basemap"&lt;/P&gt;&lt;P&gt;ServiceUri="{Binding Source={StaticResource myVM}, Path=BaseMapUri}"/&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 00:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497668#M6106</guid>
      <dc:creator>ThadTilton</dc:creator>
      <dc:date>2015-10-03T00:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISTiledMapServiceLayer's ServiceUri not binding to View Model's String Property</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497669#M6107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Once again you've helped me head down the right path with this. I had to do the following because of the Locator in MVVM Light:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="Basemap"&lt;/P&gt;&lt;P&gt;&amp;nbsp; ServiceUri="{Binding MainViewModel.BasemapUri, Source={StaticResource Locator}}"/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 20:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497669#M6107</guid>
      <dc:creator>RonVincent</dc:creator>
      <dc:date>2015-10-03T20:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISTiledMapServiceLayer's ServiceUri not binding to View Model's String Property</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497670#M6108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, glad you were able to crack it! Looks like MVVM Light adds an extra layer of complexity to the binding. &lt;/P&gt;&lt;P&gt;Thanks for posting your solution for others who will (inevitably) run into this problem. &lt;/P&gt;&lt;P&gt;Thad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 17:07:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgistiledmapservicelayer-s-serviceuri-not/m-p/497670#M6108</guid>
      <dc:creator>ThadTilton</dc:creator>
      <dc:date>2015-10-05T17:07:04Z</dc:date>
    </item>
  </channel>
</rss>

