THATS IT....THANKS FOR YOUR HELP...SO VERY APPRECIATED....THIS IS MY total Identify code in VB...The addition to allow this is highlighted in RED....you will have to scroll to the right in the first sub "QueryPoint_MouseClick"All from the ESRI example on Identify....This was the only addition to the code '===========================================================================================================================
' IDENTIFY START
'===========================================================================================================================
Private Sub QueryPoint_MouseClick(ByVal sender As Object, ByVal e As ESRI.ArcGIS.Client.Map.MouseEventArgs)
Dim clickPoint As ESRI.ArcGIS.Client.Geometry.MapPoint = e.MapPoint
Dim identifyParams As ESRI.ArcGIS.Client.Tasks.IdentifyParameters = New IdentifyParameters() With {.Geometry = clickPoint, .MapExtent = MyMap.Extent, .SpatialReference = MyMap.SpatialReference, .Width = CInt(Fix(MyMap.ActualWidth)), .Height = CInt(Fix(MyMap.ActualHeight)), .LayerOption = LayerOption.visible}
Dim identifyTask2 As New IdentifyTask("http://services.arcgisonline.com/ArcGIS/rest/services/" & "Demographics/USA_Median_Household_Income/MapServer")
AddHandler identifyTask2.ExecuteCompleted, AddressOf IdentifyTask2_ExecuteCompleted
AddHandler identifyTask2.Failed, AddressOf IdentifyTask2_Failed
identifyTask2.ExecuteAsync(identifyParams)
Dim graphicsLayer As GraphicsLayer = TryCast(MyMap.Layers("MyLayer"), GraphicsLayer)
graphicsLayer.ClearGraphics()
Dim graphic As New ESRI.ArcGIS.Client.Graphic() With {.Geometry = clickPoint, .Symbol = PushPinPictureSymbol}
graphicsLayer.Graphics.Add(graphic)
End Sub
Public Sub ShowFeatures(ByVal results As List(Of IdentifyResult))
_dataItems = New List(Of DataItem)()
If results IsNot Nothing AndAlso results.Count > 0 Then
IdentifyComboBox.Items.Clear()
For Each result As IdentifyResult In results
Dim feature As Graphic = result.Feature
Dim title As String = result.Value.ToString() & " (" & result.LayerName & ")"
_dataItems.Add(New DataItem() With {.Title = title, .Data = feature.Attributes})
IdentifyComboBox.Items.Add(title)
Next result
' Workaround for bug with ComboBox
IdentifyComboBox.UpdateLayout()
IdentifyComboBox.SelectedIndex = 0
End If
End Sub
Private Sub cb_SelectionChanged(ByVal sender As Object, ByVal e As SelectionChangedEventArgs)
Dim index As Integer = IdentifyComboBox.SelectedIndex
If index > -1 Then
IdentifyDetailsDataGrid.ItemsSource = _dataItems(index).Data
End If
End Sub
Private Sub IdentifyTask_ExecuteCompleted(ByVal sender As Object, ByVal args As IdentifyEventArgs)
IdentifyDetailsDataGrid.ItemsSource = Nothing
If args.IdentifyResults IsNot Nothing AndAlso args.IdentifyResults.Count > 0 Then
'If DataGridScrollViewer.Visibility = Visibility.Collapsed Then
If IdentifyResultsPanel.Visibility = Visibility.Collapsed Then
IdentifyResultsPanel.Visibility = Visibility.Visible
IdentifyGrid.Height = Double.NaN
IdentifyGrid.UpdateLayout()
End If
ShowFeatures(args.IdentifyResults)
Else
IdentifyComboBox.Items.Clear()
IdentifyComboBox.UpdateLayout()
If IdentifyResultsPanel.Visibility = Visibility.Visible Then
IdentifyResultsPanel.Visibility = Visibility.Collapsed
IdentifyGrid.Height = Double.NaN
IdentifyGrid.UpdateLayout()
End If
End If
End Sub
Public Class DataItem
Private privateTitle As String
Public Property Title() As String
Get
Return privateTitle
End Get
Set(ByVal value As String)
privateTitle = value
End Set
End Property
Private privateData As IDictionary(Of String, Object)
Public Property Data() As IDictionary(Of String, Object)
Get
Return privateData
End Get
Set(ByVal value As IDictionary(Of String, Object))
privateData = value
End Set
End Property
End Class
Private Sub IdentifyTask_Failed(ByVal sender As Object, ByVal e As TaskFailedEventArgs)
MessageBox.Show("Identify failed. Error: " & e.Error.Message)
End Sub