<Window x:Class="Demo1.View.ReaderInfoView" Name="ReaderInfoWindow"
        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:viewModel="clr-namespace:Demo1.ViewModel"
        xmlns:local="clr-namespace:Demo1.View"
        mc:Ignorable="d"
        Title="Reader Info" Height="400" Width="300"
        WindowStartupLocation="CenterOwner"
        Icon="/DemoLib;Component/Ressource/Logo.ico"
        WindowStyle="ToolWindow">
    <Window.DataContext>
        <viewModel:ReaderInfoViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Background="#FFFFCC00" Height="10" />
        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="5">
            <TextBlock Text="Reader: " FontWeight="Bold" />
            <TextBlock Text="{Binding Reader.Ident}" Margin="5,0" />
        </StackPanel>
        <ScrollViewer Grid.Row="2" Margin="5" VerticalScrollBarVisibility="Auto">
            <ItemsControl ItemsSource="{Binding ReaderProperties}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Name, StringFormat={}{0}:}" FontWeight="Bold" Margin="0,0,5,0" />
                            <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Value}" />
                            <TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Description}" Margin="5,0,5,5" />
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
        <StackPanel Grid.Row="3" Margin="5" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Content="Close"
                    Width="80"
                    Command="{Binding CloseCommand}"
                    CommandParameter="{Binding ElementName=ReaderInfoWindow}"
                    IsDefault="True"
                    IsCancel="True" />
        </StackPanel>
    </Grid>
</Window>