<Window x:Class="SelectedDataRecordsBinding_Wpf_2009_Q11.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:local="clr-namespace:SelectedDataRecordsBinding_Wpf_2009_Q11"
    Title="Window1" Height="500" Width="300">
    <Grid Loaded="Grid_Loaded">
        <Grid.Resources>
            <!--Converter that converts from SelectedRecordsCollection to a collection of data items-->
            <local:SelectedRecordsConverter x:Key="SelectedRecordsConverter"/>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="200"/>
            <RowDefinition Height="200"/>
        </Grid.RowDefinitions>
		<telerik:RadGridView x:Name="RadGridView1" MultipleSelect="True" Grid.Row="0"></telerik:RadGridView>
        <!--Use our converter when binding to SelectedRecords-->
        <ListView x:Name="listView" Grid.Row="1" ItemsSource="{Binding ElementName=RadGridView1, Path=SelectedRecords, Converter={StaticResource SelectedRecordsConverter}}">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Border BorderThickness="2" BorderBrush="Blue">
                        <TextBlock Text="{Binding Sender}" FontSize="18"/>
                    </Border>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Window>
