Select to view content in your preferred language

TOC Questions

1097
4
09-13-2010 12:28 AM
UlfGrimhardt
Deactivated User
Hi

I created following TOC from the Silverlight Samples Page:

<ListBox ItemsSource="{Binding ElementName=map, Path=Layers.[0].Layers}" MinWidth="330" Margin="5" FontWeight="Normal">
                                    <ListBox.ItemsPanel>
                                        <ItemsPanelTemplate VirtualizingStackPanel.VirtualizationMode="Standard" />
                                    </ListBox.ItemsPanel>
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <StackPanel Orientation="Horizontal">
                                                <CheckBox Margin="2"
                                                Name="WasserhaltungMXD"
                                                Content="{Binding Name}" Tag="{Binding ID}"
                                                ClickMode="Press"
                                                Click="CheckBox_Click2"
                                                IsChecked="{Binding DefaultVisibility}" />
                                            </StackPanel>
                                        </DataTemplate>
                            </ListBox.ItemTemplate>

Now i have two Question:

1. Is it possible to group the TOC by individual Groups, so that the List box consists of some kind of TreeView, and not all Sublayer-Checkboxes are shown at once??

2. Is it possible to create a Slider to change the Opacity of the Sublayers, like one can do it with the Layers??
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
1. Is it possible to group the TOC by individual Groups, so that the List box consists of some kind of TreeView, and not all Sublayer-Checkboxes are shown at once??

It is possible but it needs some developments to create the hierarchical data.
From version 2.1, a legend/TOC control will be provided.

2. Is it possible to create a Slider to change the Opacity of the Sublayers, like one can do it with the Layers??

No that's not possible. The opacity of sublayers is defined when publishing the service and can't be changed by the REST API.
0 Kudos
YgorThomaz
Emerging Contributor
From version 2.1, a legend/TOC control will be provided.

EXCELENT NEWS!!!!!
0 Kudos
DavidAshton
Frequent Contributor
I have not downloaded 2.1 but I did read through the "What's New" and I did not see any mention of a legend/TOC control being provided.

Did this happen "From version 2.1, a legend/TOC control will be provided."





It is possible but it needs some developments to create the hierarchical data.
From version 2.1, a legend/TOC control will be provided.


No that's not possible. The opacity of sublayers is defined when publishing the service and can't be changed by the REST API.
0 Kudos
dotMorten_esri
Esri Notable Contributor
It's not available in the beta, but should be in the RC.
0 Kudos