<?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 Reorder layers in the Legend control in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593863#M3045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What's the best way to allow the user to re-order the layers in the map by dragging and dropping the layer name in the Legend control? This was possible in ArcObjects and it would be very useful now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Apr 2013 20:40:26 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2013-04-05T20:40:26Z</dc:date>
    <item>
      <title>Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593863#M3045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What's the best way to allow the user to re-order the layers in the map by dragging and dropping the layer name in the Legend control? This was possible in ArcObjects and it would be very useful now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 20:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593863#M3045</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-04-05T20:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593864#M3046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A few time ago, I did such a tentative in this &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=d9b1b6a5336049ef919259c5757d938c"&gt;KML sample&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Might help as a starting point but would likely need to be enhanced.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 10:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593864#M3046</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-04-08T10:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593865#M3047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's exactly what I need to do. Thanks a lot, I will be trying it out soon.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:02:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593865#M3047</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-04-08T13:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593866#M3048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're using the following references that appear to be only for Silverlight:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Windows.Controls.Toolkit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Windows.Controls.Input.Toolkit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are these assemblies available for Windows apps, or what alternative do you suggest?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I can't seem to find TreeViewExtended in the ESRI primitives assembly. I'm using 10.1.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;George&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 20:47:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593866#M3048</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-04-08T20:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593867#M3049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems the DragDrogTargetTreeView Silverlight control that I am using in this sample doesn't exist in the WPF toolkit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's possible to manage &lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms742859.aspx"&gt;drag and drop &lt;/A&gt;&lt;SPAN&gt;in WPF as well but it's likely more difficult than what I did in SL. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for sending you in the wrong direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Concerning TreeViewExtended, it was built to workaround some limitations in SL and is not needed in WPF. So we can use the standard TreeView instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 05:55:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593867#M3049</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-04-11T05:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593868#M3050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ended up not doing the drag&amp;amp;drop since my end result was not good enough and didn't look quite nice enough. It would take too long to get right and we don't have much time. But I still kept some of the control customization that you had in your sample app. I'm using a TreeView instead of a TreeViewExtended, per your suggestion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had a question, though. How did you make it so that tree nodes get expanded automatically when the layer is added?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 12:49:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593868#M3050</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-04-15T12:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593869#M3051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The legend Template sets these style bindings for the default tree view style:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;TreeView.ItemContainerStyle&amp;gt; &amp;lt;Style TargetType="TreeViewItem"&amp;gt; &amp;lt;Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/&amp;gt; &amp;lt;Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/&amp;gt; &amp;lt;/Style&amp;gt; &amp;lt;/TreeView.ItemContainerStyle&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;So the treeview expanded state is binded to the LayerItemViewModel.IsExpanded property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As the default value for LayerItemViewModel.IsExpanded is true, the tree nodes get expanded by default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to change that, you can either remove the binding in the style (but you won't be able to change the 'expanded' state of an item by code), or you can set LayerItemViewModel.IsExpanded to false by code (likely on event Legend.Refreshed)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 14:06:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593869#M3051</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-04-15T14:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder layers in the Legend control</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593870#M3052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's it, I had to add that style setters since I'm specifying my own ControlTemplate. Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 15:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/reorder-layers-in-the-legend-control/m-p/593870#M3052</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-04-15T15:25:45Z</dc:date>
    </item>
  </channel>
</rss>

