AnsweredAssumed Answered

Esri Toolkit 100.2.1 - Beta 3: Table of Contents Layer Selection

Question asked by deleted-user-Qwv0Lt2wZ0Zu on Jul 10, 2018
Latest reply on Jul 12, 2018 by deleted-user-Qwv0Lt2wZ0Zu



I have downloaded the Esri Toolkit for ArcGIS Runtime 100.2.1 Beta 3, and I was wondering if anyone could provide me with a way that I can access the selected layer of the table of contents control. I am using the ArcGIS runtime project template that includes the MainWindow.xaml and MapViewModel.cs class.


I have implemented the TOC control within the MainWindow, and it is automatically loading the layers that I have wired up within the MapViewModel.


<esri:TableOfContents Grid.Column="0" x:Name="toc" GeoView="{Binding ElementName=MainMapView}" ShowLegend="False" FontSize="18" Selector.SelectionChanged="toc_SelectionChanged" ></esri:TableOfContents>
<CheckBox Content="Show Legend" IsChecked="{Binding ShowLegend, ElementName=toc, Mode=TwoWay}" Margin="10,30,10,10" />

But how do I access the selected layer of the TOC control within the MapViewModel when I interact with the TOC during runtime? 


Thank you!