VisualizationLayer SelectedItems

2 posts, 0 answers
  1. John
    John avatar
    7 posts
    Member since:
    Apr 2014

    Posted 30 Apr 2014 Link to this post

    Is it possible to bind SelectedItems on the VisualizationLayer?
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 05 May 2014 Link to this post

    Hello John,

    Yes, it is possible.
    The sample code is below.
    <Window x:Class="SelectedItemsBindingTest.MainWindow"
            Title="MainWindow" Height="350" Width="525">
        <Grid x:Name="LayoutRoot">
            <telerik:RadMap x:Name="radMap"
                    <telerik:OpenStreetMapProvider />
                <telerik:VisualizationLayer x:Name="layer"
                                            SelectedItems="{Binding SelectedItems}">
                        <telerik:MapShapeFill Fill="#9f5f5f5f"
                                              Stroke="White" StrokeThickness="1" />
                        <telerik:AsyncShapeFileReader Source="/SelectedItemsBindingTest;component/Resources/Europe.shp" />

    using System.Collections.ObjectModel;
    using System.Windows;
    namespace SelectedItemsBindingTest
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
            public MainWindow()
                this.SelectedItems = new ObservableCollection<object>();
                this.SelectedItems.CollectionChanged += SelectedItems_CollectionChanged;
                this.DataContext = this;
            public ObservableCollection<object> SelectedItems
            private void SelectedItems_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)

    Andrey Murzov
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top