<?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: ClosedFacility - in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535491#M13725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All the buttons have Command binding which can only be resolved if their DataContext is resolved. In this sample, each button's DataContext is set to an Editor which is part of Resources.&amp;nbsp; Each of these editors has their Map property bound to a map, using Element binding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you are moving this to a different UserControl that does not contain your map, Element binding will not work. You need to resort to other means of binding. Maybe create your own DependencyProperty (Map) in the UserControl so that you can use this instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Oct 2010 23:14:40 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2010-10-26T23:14:40Z</dc:date>
    <item>
      <title>ClosedFacility -</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535488#M13722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Scenario description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Create a UserControls file by loading the ClosedFacility component from ESRI: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ClosestFacility"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ClosestFacility&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Add some code in MainPage.xaml and MainPage.xaml.cs to load the ClosedFacility dialog when it is needed.&amp;nbsp; Also set this component's _Map the same as the parent's (MainPage defined):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyClosedFacility.SetParent(this);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyClosedFacility.SetMap(MyMap);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when the dialog pops out, all of the buttons (except for the Clear button) are greyed out.&amp;nbsp; Thus, no featurs (points, lines or polygons) can be added.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know why those buttons are greyed-out.&amp;nbsp; I appreciate if you can provide your hint.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Oct 2010 17:56:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535488#M13722</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2010-10-21T17:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: ClosedFacility -</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535489#M13723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think this is related to another post &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/15443-User-controls-code-structuring"&gt;http://forums.arcgis.com/threads/15443-User-controls-code-structuring&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When using different UserControls, you can create a DependencyProperty (Map) on the UserControl or set DataContext and update your binding statements.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Oct 2010 18:55:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535489#M13723</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-21T18:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: ClosedFacility -</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535490#M13724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jennifer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked the reference link you provided and but not successful.&amp;nbsp; In debugging, I tried to track the values of the buttons (e.g. one of them is the FacilityRadioButton).&amp;nbsp;&amp;nbsp; The FacilityRadioButton.IsEnbled is always 'false' even though I tried &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; this.FacilitiesRadioButton.IsEnabled = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the constructor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried find where how the buttons are set initially but no clue has been obtained from the existing code.&amp;nbsp; I can't understand that why the ClearButton.IsEnabled = true always.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wish you can provide some clues if you can.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaning&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 14:35:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535490#M13724</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2010-10-26T14:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: ClosedFacility -</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535491#M13725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All the buttons have Command binding which can only be resolved if their DataContext is resolved. In this sample, each button's DataContext is set to an Editor which is part of Resources.&amp;nbsp; Each of these editors has their Map property bound to a map, using Element binding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you are moving this to a different UserControl that does not contain your map, Element binding will not work. You need to resort to other means of binding. Maybe create your own DependencyProperty (Map) in the UserControl so that you can use this instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 23:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/closedfacility/m-p/535491#M13725</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-26T23:14:40Z</dc:date>
    </item>
  </channel>
</rss>

