<Window x:Class="WpfApplication19.DailyCheck"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DailyCheck" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="351" SizeToContent="WidthAndHeight" ResizeMode="CanResize" WindowStartupLocation="CenterScreen" WindowState="Maximized" Closed="Window_Closed">
	<Window.Resources>
		<Style TargetType="{x:Type DataGridCell}">
			<Style.Triggers>
				<Trigger Property="DataGridCell.IsFocused" Value="True">
					<Setter Property="Background" Value="#ff0000" />
					<Setter Property="Foreground" Value="#ffffff" />
				</Trigger>
				

			</Style.Triggers>
			<Setter Property="FontSize" Value="20" />
		</Style>
		<Style x:Key="DatePickerStyle1" TargetType="{x:Type DatePicker}">
			<Setter Property="Foreground" Value="#FF333333"/>
			<Setter Property="IsTodayHighlighted" Value="True"/>
			<Setter Property="SelectedDateFormat" Value="Short"/>
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Padding" Value="2"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint=".5,0" StartPoint=".5,1">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type DatePicker}">
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_DisabledVisual"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Grid x:Name="PART_Root" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
								<Grid.Resources>
									<SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
									<ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
										<Grid>
											<VisualStateManager.VisualStateGroups>
												<VisualStateGroup x:Name="CommonStates">
													<VisualStateGroup.Transitions>
														<VisualTransition GeneratedDuration="0"/>
														<VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
														<VisualTransition GeneratedDuration="0:0:0.1" To="Pressed"/>
													</VisualStateGroup.Transitions>
													<VisualState x:Name="Normal"/>
													<VisualState x:Name="MouseOver"/>
													<VisualState x:Name="Pressed"/>
													<VisualState x:Name="Disabled"/>
												</VisualStateGroup>
											</VisualStateManager.VisualStateGroups>
											<Image Grid.ColumnSpan="1" Grid.RowSpan="1" Source="ical2.png" Margin="0,0,1,0.298"/>
										</Grid>
									</ControlTemplate>
								</Grid.Resources>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="*"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<Button x:Name="PART_Button" Grid.Column="1" Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="Left" Margin="3,0,3,0" Grid.Row="0" Template="{StaticResource DropDownButtonTemplate}" VerticalAlignment="Top" Width="30"/>
								<DatePickerTextBox x:Name="PART_TextBox" Grid.Column="0" Foreground="{TemplateBinding Foreground}" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="Stretch" Grid.Row="0" VerticalContentAlignment="Stretch" FontSize="16"/>
								<Grid x:Name="PART_DisabledVisual" Grid.ColumnSpan="2" Grid.Column="0" IsHitTestVisible="False" Opacity="0" Grid.Row="0">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="*"/>
										<ColumnDefinition Width="Auto"/>
									</Grid.ColumnDefinitions>
									<Rectangle Grid.Column="0" Fill="#A5FFFFFF" RadiusY="1" Grid.Row="0" RadiusX="1"/>
									<Rectangle Grid.Column="1" Fill="#A5FFFFFF" Height="18" Margin="3,0,3,0" RadiusY="1" Grid.Row="0" RadiusX="1" Width="19"/>
									<Popup x:Name="PART_Popup" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
								</Grid>
							</Grid>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>
	<Viewbox>
	<Grid Width="800" Height="311">
		<Button Content="Save" Height="32" HorizontalAlignment="Left" Margin="673,175,0,0" Name="saveBtn" VerticalAlignment="Top" Width="81" Click="saveBtn_Click" />
		<TextBlock Height="94" HorizontalAlignment="Left" Margin="646,67,0,0" Name="measureBlock" Text="00.00" VerticalAlignment="Top" Width="142" Background="#FF1A0202" Foreground="#FFF21919" TextAlignment="Center" FontSize="56" Padding="0,8" />
		<DataGrid AutoGenerateColumns="False" Height="187" HorizontalAlignment="Left" Margin="41,67,0,0" Name="dailyCheckGrid" VerticalAlignment="Top" Width="561" CanUserAddRows="False"  CanUserReorderColumns="False" CanUserSortColumns="False" Focusable="True"  SelectedValuePath="P1" SelectionUnit="FullRow" GotFocus="dailyCheckGrid_GotFocus"  Loaded="dailyCheckGrid_Loaded">
			<DataGrid.Columns>
				<DataGridTextColumn Header="Header" Width="*" Binding="{Binding header}" IsReadOnly="True"/>
				<DataGridTextColumn Header="P1" Width="*" Binding="{Binding p1, StringFormat=0.00}" IsReadOnly="True" />
				<DataGridTextColumn Header="P2" Width="*" Binding="{Binding p2, StringFormat=0.00}" IsReadOnly="True"/>
				<DataGridTextColumn Header="P3"  Width="*" Binding="{Binding p3, StringFormat=0.00}" IsReadOnly="True"/>
				<DataGridTextColumn Header="Avg"  Width="*" Binding="{Binding avg, StringFormat=0.00}" IsReadOnly="True"/>
				<DataGridTextColumn Header="Result"  Width="*" Binding="{Binding result}" IsReadOnly="True"/>
			</DataGrid.Columns>
		</DataGrid>
		<Button Content="Commit" Height="23" HorizontalAlignment="Left" Margin="527,268,0,0" Name="commitBtn" VerticalAlignment="Top" Width="75" Click="commitBtn_Click" />
		<DatePicker Height="29" HorizontalAlignment="Left" Margin="233.725,24.683,0,0" Name="datePicker" VerticalAlignment="Top" Width="142" Text="hello" SelectedDateChanged="datePicker_SelectedDateChanged" Style="{DynamicResource DatePickerStyle1}" RenderTransformOrigin="0.509,-0.966" />
		<ComboBox Height="29.858" HorizontalAlignment="Left" Margin="41,24.254,0,0" Name="shiftCB" VerticalAlignment="Top" Width="172.853" SelectedIndex="0" FontSize="16">
			<ComboBoxItem Content="Day ( 08.00 - 20.00 )" Tag="day" />
			<ComboBoxItem Content="Night ( 20.00 - 08.00 )" Tag="night" />
		</ComboBox>
		<TextBlock Height="23" HorizontalAlignment="Left" Margin="41,269,0,0" Name="textBlock1" Text="Standard values,  OB :" VerticalAlignment="Top" Foreground="#CA000000" />
		<TextBlock Height="23" HorizontalAlignment="Left" Margin="164,268,0,0" Name="textBlock2" Text="0.59 - 0.70" VerticalAlignment="Top" Foreground="#FF3063F0" FontWeight="Bold" FontSize="14" />
		<TextBlock Foreground="#CA000000" Height="23" HorizontalAlignment="Left" Margin="265,270,0,0" Name="textBlock4" Text="OC :" VerticalAlignment="Top" />
		<TextBlock FontSize="14" FontWeight="Bold" Foreground="#FF3063F0" Height="23" HorizontalAlignment="Left" Margin="297,268,0,0" Name="textBlock3" Text="0.28 - 0.37" VerticalAlignment="Top" />
	</Grid>
	</Viewbox>
</Window>
