<UserControl x:Class="MIS.Be.Infomat.Controls.VisitItemsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:gl="clr-namespace:System.Globalization;assembly=mscorlib"
             mc:Ignorable="d" 
             Loaded="UserControl_Loaded"
             d:DesignHeight="1024" d:DesignWidth="1280">
	<Grid Margin="0, 25">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="150" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="9*"/>
			<ColumnDefinition Width="*"/>
		</Grid.ColumnDefinitions>
		<Label Grid.Row="0" Name="header" Content="Выписанные талоны" FontSize="36" FontFamily="Georgia" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
		<Button Name="dispanserizationButton" Grid.Row="1" Margin="25, 10" Style="{StaticResource DefaultButton}" HorizontalContentAlignment="Stretch" Visibility="Collapsed" Click="DispanserizationButton_Click">
			<Grid Margin="25, 35">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="Auto" />
				</Grid.ColumnDefinitions>
				<TextBlock Grid.Column="0" Text="Диспансеризация" VerticalAlignment="Center" TextAlignment="Left" TextWrapping="Wrap" FontSize="48" FontFamily="Georgia" Margin="10, 0" />
				<TextBlock Grid.Column="1" Text="{Binding BeginDate, StringFormat={}{0:dd MMMM}, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" VerticalAlignment="Center" TextAlignment="Left" TextWrapping="Wrap" FontSize="48" FontFamily="Georgia" Margin="10, 0" />
			</Grid>
		</Button>
		<ItemsControl Name="list" Grid.Row="2" Grid.Column="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
			<ItemsControl.Template>
				<ControlTemplate>
					<ScrollViewer VerticalScrollBarVisibility="Hidden" CanContentScroll="True">
						<ItemsPresenter />
					</ScrollViewer>
				</ControlTemplate>
			</ItemsControl.Template>
			<ItemsControl.ItemsPanel>
				<ItemsPanelTemplate>
					<StackPanel VerticalAlignment="Center" />
				</ItemsPanelTemplate>
			</ItemsControl.ItemsPanel>
			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<Button Margin="25, 10" Style="{StaticResource DefaultButton}" HorizontalContentAlignment="Stretch" Click="VisitItemButton_Click">
						<Grid Margin="25, 10">
							<Grid.RowDefinitions>
								<RowDefinition Height="*" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="Auto" />
							</Grid.ColumnDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding EmployeeName}" VerticalAlignment="Center" TextAlignment="Left" TextWrapping="Wrap" FontSize="48" FontFamily="Georgia" Margin="10, 0" />
							<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding SpecialtyName}" VerticalAlignment="Center" TextAlignment="Left" TextWrapping="Wrap" FontSize="36" FontFamily="Georgia" Foreground="DimGray" Margin="10, 0" />
							<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" Text="{Binding BeginDateTime, StringFormat={}{0:dd MMMM HH:mm}, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" VerticalAlignment="Center" TextAlignment="Left" TextWrapping="Wrap" FontSize="48" FontFamily="Georgia" Margin="10, 0" />
						</Grid>
					</Button>
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>
		<Button x:Name="upButton" Grid.Row="1" Grid.RowSpan="2" Grid.Column="1" Style="{StaticResource YellowButton}" VerticalAlignment="Top" Click="UpButton_Click">
			<TextBlock TextWrapping="Wrap" FontSize="60" FontFamily="Georgia" Text="&lt;" RenderTransformOrigin="0.5,0.5" Margin="12, 0, 0, 0">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="90"/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
		</Button>
		<Button x:Name="downButton" Grid.Row="1" Grid.RowSpan="2" Grid.Column="1"  Style="{StaticResource YellowButton}" VerticalAlignment="Bottom" Click="DownButton_Click">
			<TextBlock TextWrapping="Wrap" FontSize="60" FontFamily="Georgia" Text="&gt;" RenderTransformOrigin="0.5,0.5" Margin="12, 0, 0, 0">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="90"/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
		</Button>
		<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
			<Button x:Name="prevButton" HorizontalContentAlignment="Center" Margin="25, 10" Style="{StaticResource YellowButton}" Click="PrevButton_Click">
				<TextBlock TextWrapping="Wrap" TextAlignment="Center" Margin="25" FontSize="60" FontFamily="Georgia" Text="Назад" />
			</Button>
		</StackPanel>
	</Grid>
</UserControl>
