<UserControl x:Class="KellermanSoftware.ContactsModule.Views.ContactHistoryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <GroupBox Margin="5" Header="History">
            <DockPanel>
                <Grid DockPanel.Dock="Bottom" Margin="5,0,5,0">
                    <Button Content="Add" HorizontalAlignment="Left"
                            Command="{Binding Path=AddCommand}" />
                    <Button Content="Edit" HorizontalAlignment="Center"
                            Command="{Binding Path=EditCommand}" />
                    <Button Content="Delete" HorizontalAlignment="Right"
                            Command="{Binding Path=DeleteCommand}" />
                </Grid>
                <ListView Margin="5" ScrollViewer.VerticalScrollBarVisibility="Auto"
                          IsSynchronizedWithCurrentItem="True"
                          ItemsSource="{Binding Path=History}">
                    <ListView.View>
                        <GridView>
                            <GridViewColumn Header="Date" Width="80"
                                            DisplayMemberBinding="{Binding Path=UpdateDate,
                                                                           StringFormat={}{0:d}}" />
                            <GridViewColumn Header="Type" Width="80"
                                            DisplayMemberBinding="{Binding Path=ContactType}" />
                            <GridViewColumn Header="Note" Width="300"
                                            DisplayMemberBinding="{Binding Path=Note}" />
                        </GridView>
                    </ListView.View>
                </ListView>
            </DockPanel>
        </GroupBox>
    </Grid>
</UserControl>
