<Page x:Class="SASDesktop.Views.Managment.CitizenPassListOut"
      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" 
      xmlns:local="clr-namespace:SASDesktop.Views.Managment"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="CitizenPassListOut">
    <ScrollViewer>
        
        <StackPanel
        CanVerticallyScroll="True"
        Style="{StaticResource FormContainer}">

        <TextBlock HorizontalAlignment="Center"
                   Style="{StaticResource H2}"
                   Text="Список выданных прав"/>

        <Grid>
            <StackPanel>

                <StackPanel Orientation="Horizontal">
                    <Button Content="Добавить"
                          Style="{StaticResource StandartButton}"
                          Command="{Binding AddCmd}"/>
                    <Button Content="Редактировать"
                          Style="{StaticResource StandartButton}"
                          Command="{Binding EditCmd}"/>
                    <Button Content="Удалить"
                          Style="{StaticResource StandartButton}"
                          Command="{Binding DeleteCmd}"/>
                    <Button Content="Назад"
                          Style="{StaticResource StandartButton}"
                          Command="{Binding BackCmd}"/>
                </StackPanel>

                <ListView ItemsSource="{Binding lvOutPutPass}" 
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        Height="370">
                    <ListView.ItemsPanel>
                        <ItemsPanelTemplate>
                            <WrapPanel Orientation="Horizontal"/>
                        </ItemsPanelTemplate>
                    </ListView.ItemsPanel>
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                    <StackPanel Width="200">
                                        <StackPanel Orientation="Vertical">
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Style="{StaticResource H5}" Text="Водитель:"/>
                                                <TextBlock Margin="10 0 0 0" Style="{StaticResource H5}" Text="{Binding Path=Citizen1.GetHumanName}"/>
                                            </StackPanel>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Style="{StaticResource H5}" Text="Серия и номер:"/>
                                                <TextBlock Margin="5 0 0 0" Style="{StaticResource H5}" Text="{Binding Series}"/>
                                                <TextBlock Margin="5 0 0 0" Style="{StaticResource H5}" Text="{Binding Number}"/>
                                            </StackPanel>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Style="{StaticResource H5}" Text="Дата получения:"/>
                                                <TextBlock Margin="10 0 0 0" Style="{StaticResource H5}" Text="{Binding DateStart, StringFormat=d}"/>
                                            </StackPanel>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Style="{StaticResource H5}" Text="Дата окончания:"/>
                                                <TextBlock Margin="10 0 0 0" Style="{StaticResource H5}" Text="{Binding DiateFinish, StringFormat=d}"/>
                                            </StackPanel>
                                        </StackPanel>
                                    </StackPanel>
                                </Grid>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackPanel>
        </Grid>
        </StackPanel>
    </ScrollViewer>
</Page>
