silverlight - ListBox SelectionChanged event with item template

ListBox SelectionChanged event when using ItemTemplate and SelectionMode Multiple in silverlight
MainPage.xaml

<UserControl 
    x:Class="SilverlightApps.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="600" 
    d:DesignWidth="800" 
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    >

    <Grid x:Name="LayoutRoot" Background="White">
        <Rectangle
            Name="Rectangle1"
            Fill="AliceBlue" 
            HorizontalAlignment="Left" 
            Height="82" 
            Margin="20,12,0,0" 
            Stroke="Black" 
            VerticalAlignment="Top" 
            Width="600"
            StrokeThickness="0"
            />

        <TextBlock 
            Name="TextBlock1" 
            Height="82" 
            HorizontalAlignment="Left" 
            Margin="20,9,0,0" 
            Text="ListBox SelectionChanged event when using ItemTemplate and SelectionMode Multiple in silverlight"
            VerticalAlignment="Top"
            TextWrapping="Wrap"
            FontSize="20"
            FontStyle="Italic"
            Foreground="MidnightBlue"
            Width="600"
            Padding="25,10,10,0"
            />

        <TextBlock 
            Name="TextBlock2" 
            Height="337" 
            HorizontalAlignment="Left" 
            Margin="344,116,0,0" 
            Text="Select Item(s) From ListBox"
            VerticalAlignment="Top"
            TextWrapping="Wrap"
            FontSize="10"
            Foreground="Crimson"
            Width="384"
            />

        <ListBox 
            Name="ListBox1" 
            BorderThickness="1" 
            BorderBrush="LightSkyBlue" 
            Margin="20,116,0,147"
            HorizontalAlignment="Left"
            FontSize="13"
            Width="300"
            Padding="0"
            SelectionMode="Multiple"
            SelectionChanged="ListBox1_SelectionChanged"
            >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical">
                        <TextBlock
                            Text="{Binding BookName}" 
                            Foreground="MidnightBlue"
                            FontFamily="Georgia"
                            FontWeight="Bold"
                            FontSize="14"
                            TextWrapping="Wrap"
                            Width="275"
                            />
                        <TextBlock 
                            Text="{Binding Author}" 
                            Foreground="DimGray"
                            FontFamily="Comic Sans MS"
                            FontStyle="Italic"
                            TextWrapping="Wrap"
                            Width="275"
                            />
                        <TextBlock 
                            Text="{Binding Price}" 
                            Foreground="Magenta"
                            FontFamily="Courier New"
                            FontWeight="ExtraBlack"
                            TextWrapping="Wrap"
                            Width="275"
                            />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
MainPage.xaml.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightApps
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            List<Book> Books = new List<Book>();

            Books.Add(
                new Book(
                        "Beginning ASP.NET Web Pages with WebMatrix",
                        "Mike Brind, Imar Spaanjaars",
                        "US $39.99"
                        )
                    );

            Books.Add(
                new Book(
                        "Professional Sitecore Development",
                        "John West",
                        "US $44.99"
                        )
                    );

            Books.Add(
                new Book(
                         "Professional ASP.NET MVC 3",
                         "Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen",
                         "US $44.99"
                        )
                    );

            Books.Add(
                new Book(
                         "Professional Scrum with Team Foundation Server 2010",
                         "Steve Resnick, Aaron Bjork, Michael de la Maza",
                         "US $29.99"
                        )
                    );

            Books.Add(
                new Book(
                         "Professional Windows 7 Development Guide",
                         "John Paul Mueller",
                         "US $44.99"
                        )
                    );

            ListBox1.ItemsSource = Books;
        }

        public class Book
        {
            public String BookName { get; set; }
            public String Author { get; set; }
            public String Price { get; set; }

            public Book(String bookname, String author, String price)
            {
                this.BookName = bookname;
                this.Author = author;
                this.Price = price;
            }
        }

        private void ListBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            TextBlock2.Text = "You Selected :";

            int totalItems = ListBox1.SelectedItems.Count;
            for (int i = 0; i < totalItems; i++)
            {
                Book selectedBook = (ListBox1.SelectedItems[i]) as Book;

                TextBlock2.Text += "\n\nBook Name: " + selectedBook.BookName;
                TextBlock2.Text += "\nAuthor: " + selectedBook.Author;
                TextBlock2.Text += "\nPrice: " + selectedBook.Price;
            }
        }
    }
}
More silverlight examples