Declined
Last Updated: 08 Oct 2014 14:34 by ADMIN
Created by: Alexi
Comments: 1
Category: ListBox
Type: Bug Report
0
Currently I´m testing the latest versión of Telerik Silverlight and the RadListBox control is crashing when binding VisualizationLayer items from RadMap control. It doesn´t show error information, the screen is withe.
This is the code I´m using:

VIEW

 <Grid>
  <Grid.Resources>
    <converters:ItemsMapToLayerStringConverter  x:Key="ItemsMapToLayerStringConverter" />
  </Grid.Resources>
  <Grid.RowDefinitions>
    <RowDefinition Height="*"/>
    <RowDefinition Height="Auto"/>
  </Grid.RowDefinitions>
  <telerik:RadMap x:Name="Map">
    <telerik:RadMap.Providers>
      <telerik:OpenStreetMapProvider />
    </telerik:RadMap.Providers>
  </telerik:RadMap>
  <telerik:RadListBox ItemsSource="{Binding ElementName=Map, Path=Items, Converter={StaticResource ItemsMapToLayerStringConverter}}" Gid.Row="1" >
    <telerik:RadListBox.ItemTemplate>
      <DataTemplate>
        <TextBlock Text="{Binding Tag}"/>
      </DataTemplate>
    </telerik:RadListBox.ItemTemplate>
  </telerik:RadListBox>
</Grid>

CONVERTER.

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
  var mapa = value as RadMap;
  var capas = mapa.ChildrenOfType<VisualizationLayer>().ToList();
  return capas;
}