Select to view content in your preferred language

Adding Colum to Selected Items TreeView

569
1
03-02-2012 11:41 AM
JasonSweet
Emerging Contributor
Can you add a column to the Selected Items Treeview referenced in the SDK Sample here?  I'd like to show the user something more meaningful than the ObjectID, but still be able to query related records.

Thanks,
Jason
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Sure, you can modify this part of XAML-code (under Resources)

            <common:HierarchicalDataTemplate x:Key="TreeViewItemTemplate">
                <StackPanel Orientation="Horizontal">
                    <Ellipse Fill="Transparent" Height="6" Width="6" StrokeThickness="2" Stroke="Black" Margin="0,0,10,0"/>
                    <TextBlock Text="{Binding Attributes[OBJECTID]}" FontWeight="Bold" HorizontalAlignment="Left" FontSize="10"/>
                </StackPanel>
            </common:HierarchicalDataTemplate>

0 Kudos