Thanks for your help!!!
I used your first suggestion and is working!!!!:
- Hook up an handler to the ExecuteCompleted event and, in the handler, initialize the DataContext of your control with e.FindResults (that's probably the easier way).
I passed the e.FindREsults to the getData function in the feature class and the double list is populated.
I used:
Public Shared Function GetData(ByVal data As Object) As IEnumerable(Of Feature)
Dim list As New List(Of Feature)
'list.Add(New Feature With {._featureLayerName = "FeatureLayerName1", ._featureLayerItemCount = "5 feature(s) found"})
'list(0)._featureItems.Add(New FeatureItem With {.Name = "1FeatureItemName1", .Owner = "FeatureItemOwner"})
'list(0)._featureItems.Add(New FeatureItem With {.Name = "2FeatureItemName2", .Owner = "FeatureItemOwner"})
'list(0)._featureItems.Add(New FeatureItem With {.Name = "3FeatureItemName3", .Owner = "FeatureItemOwner"})
'list(0)._featureItems.Add(New FeatureItem With {.Name = "4FeatureItemName4", .Owner = "FeatureItemOwner"})
'list(0)._featureItems.Add(New FeatureItem With {.Name = "5FeatureItemName5", .Owner = "FeatureItemOwner"})
Dim i As Integer = -1
Dim CurrentLayer As String = ""
For Each elem As ESRI.ArcGIS.Client.Tasks.FindResult In data
If String.Compare(CurrentLayer, elem.LayerName, System.StringComparison.OrdinalIgnoreCase) <> 0 Then
list.Add(New Feature With {._featureLayerName = elem.LayerName, ._featureLayerItemCount = "5 feature(s) found"})
CurrentLayer = elem.LayerName
i = i + 1
End If
list(i)._featureItems.Add(New FeatureItem With {.Name = elem.DisplayFieldName, .Owner = elem.Value})
Next
Return list
End Function
Now I got the list almost as I like it.
I need specifics fields from the layer instead what I am getting is the fields that have the information searched.
Also I need functionalities when mouse over the list item to displaythe feaures it in the map. How I could do that? I had this working using the grid.
THanks a lot for your help!!!!
Maria