Binding resultFeaturesBinding = new Binding("LastResult"); resultFeaturesBinding.Source = findTask; FindDetailsDataGrid.SetBinding(DataGrid.ItemsSourceProperty, resultFeaturesBinding);.Then in your FeatureDataTemplate you can use properties of a 'FindResult' (i.e. LayerName, LayerId, Feature, Value, ...)
<Border BorderThickness="3" BorderBrush="Green" Grid.RowSpan="2" Grid.Column="0" > <Image Source="{Binding PhotoUri}" Stretch="Fill" /> </Border> <dataInput:Label Content="{Binding FeatureLayerName}" Grid.Row="0" Grid.Column="1"/> <dataInput:Label Content="{Binding FeatureLayerItemCount}" Grid.Row="1" Grid.Column="1"/> <ListBox Padding="2" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource ="{Binding Path=FeatureItems}" ItemTemplate="{StaticResource FeatureItemDataTemplate}" />
<Border BorderThickness="3" BorderBrush="Green" Grid.RowSpan="2" Grid.Column="0" > <Image Source="{Binding Feature.Attributes[PhotoUri]}" Stretch="Fill" /> </Border> <dataInput:Label Content="{Binding LayerName}" Grid.Row="0" Grid.Column="1"/> <dataInput:Label Content="{Binding LayerId}" Grid.Row="1" Grid.Column="1"/> <dataInput:Label Content="{Binding Value}" Grid.Row="1" Grid.Column="1"/>
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 display the feaures it in the map. How I could do that?
@Dominique i want this binding behind C#
How to?
<slData:DataGridTextColumn Binding="{Binding Attributes[FID]}" Header="النتائج" />
This thread Defining Results Datagrid In Code behind should help.