Source

MusicRater / MusicRater / Views / TrackListControl.xaml

<UserControl x:Class="MusicRater.TrackListControl"
    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"
    xmlns:dummy="clr-namespace:MusicRater.DummyViewModels"  
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="600"
    d:DataContext="{Binding Source={StaticResource viewModel}}">
    <UserControl.Resources>
        <dummy:DummyTrackListControlViewModel x:Key="viewModel" />
    </UserControl.Resources>

    <Border Background="#304060" CornerRadius="5">
        <ListBox x:Name="listBox1" Grid.Row="1" ItemsSource="{Binding Tracks}" SelectedItem="{Binding SelectedTrack, Mode=TwoWay}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DisplayAuthor}" Foreground="{Binding TextBrush}" FontWeight="Bold" Width="120"/>
                        <TextBlock Text="{Binding Title}" Foreground="{Binding TextBrush}" Width="220"/>
                        <!--<ProgressBar Minimum="0" Maximum="100" Width="100" Value="{Binding Rating}" />-->
                        <TextBlock Margin="5,0" Text="{Binding DisplayRating, StringFormat=0.0}" FontWeight="Bold" Foreground="{Binding TextBrush}" Width="30" TextAlignment="Right" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Border>
</UserControl>