<UserControl x:Class="MIS.Be.Infomat.Controls.DispanserizationControl"
             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"
             mc:Ignorable="d" 
             Loaded="UserControl_Loaded"
             d:DesignHeight="1024" d:DesignWidth="1280">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="150" />
		</Grid.RowDefinitions>
		<Label Name="datesHeader" Grid.Row="0" Content="Месяц" FontSize="48" FontFamily="Georgia" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
		<Grid Name="datesGrid" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			<StackPanel Grid.Column="0" HorizontalAlignment="Center" Margin="15, 5">
				<Label Margin="5, 5" Padding="0, 0">
					<TextBlock Text="пн" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
				<Label Margin="5, 5" Padding="0, 15, 0, 0">
					<TextBlock Text="вт" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
				<Label Margin="5, 5" Padding="0, 15, 0, 0">
					<TextBlock Text="ср" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
				<Label Margin="5, 5" Padding="0, 15, 0, 0">
					<TextBlock Text="чт" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
				<Label Margin="5, 5" Padding="0, 15, 0, 0">
					<TextBlock Text="пт" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
				<Label Margin="5, 5" Padding="0, 15, 0, 0">
					<TextBlock Text="сб" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
				<Label Margin="5, 5" Padding="0, 10, 0, 0">
					<TextBlock Text="вс" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" FontWeight="Bold" Margin="0, 15" />
				</Label>
			</StackPanel>
			<ItemsControl Name="datesList" Grid.Column="1" HorizontalAlignment="Center">
				<ItemsControl.ItemsPanel>
					<ItemsPanelTemplate>
						<WrapPanel Orientation="Vertical" VerticalAlignment="Center" />
					</ItemsPanelTemplate>
				</ItemsControl.ItemsPanel>
				<ItemsControl.ItemTemplate>
					<DataTemplate>
						<Button Margin="15, 10" Style="{StaticResource DefaultButton}" IsEnabled="{Binding IsEnabled}" Click="DateListItemButton_Click" Width="90">
							<TextBlock Text="{Binding BeginDate.Day}" TextAlignment="Center" VerticalAlignment="Center" FontSize="48" FontFamily="Georgia" Margin="15">
								<TextBlock.Foreground>
									<MultiBinding Converter="{StaticResource dateToBrushConverter}">
										<Binding Path="BeginDate" />
										<Binding Path="IsEnabled" />
									</MultiBinding>
								</TextBlock.Foreground>
							</TextBlock>
						</Button>
					</DataTemplate>
				</ItemsControl.ItemTemplate>
			</ItemsControl>
		</Grid>
		<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
			<Button Name="prevButton" HorizontalContentAlignment="Center" Margin="25, 10" Style="{StaticResource YellowButton}" Click="PrevButton_Click">
				<TextBlock TextWrapping="Wrap" TextAlignment="Center" Margin="25" FontSize="48" FontFamily="Georgia" Text="Назад" />
			</Button>
		</StackPanel>
	</Grid>
</UserControl>
