<Window x:Class="Wpf_Demo.DetailsWindow"
		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:ddwpf="clr-namespace:Wpf_Demo" mc:Ignorable="d"
		Title="DetailsWindow" 
		Height="458" Width="800" Loaded="Window_Loaded">
	<!--Data context is set to sample data above and first item in sample data collection below and LayoutRoot contains the root grid where all other page content is placed-->
	<Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{Binding Items[0]}" RenderTransformOrigin="0.5,0.5">
		<Grid.Resources>
			<ddwpf:EnumToIEnumerableConverter x:Key="EnumToIEnumerableConverter" />
			<ddwpf:EnumToIntConverter x:Key="EnumToIntConverter" />
		</Grid.Resources>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		<!--<Grid.Resources>
						<ViewModels:ItemViewModel x:Key="Item" />
		</Grid.Resources>-->

		<!--TitlePanel contains the name of the application and page title-->
		<StackPanel x:Name="TitlePanel" Margin="23,24,26,12">
			<TextBlock x:Name="ApplicationTitle" Text="Bucket List" FontSize="16" />
			<TextBlock x:Name="ListTitle" Text="To do before I kick the bucket" FontSize="21.333"/>
		</StackPanel>

		<!--ContentPanel contains details text. Place additional content here-->
		<Grid x:Name="ContentPanel" Grid.Row="1" Margin="20,20,20,20">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" MinHeight="68" />
				<RowDefinition Height="Auto" MinHeight="56" />
				<RowDefinition Height="Auto" MinHeight="68" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="0.25*" />
				<ColumnDefinition Width="0.75*"/>
			</Grid.ColumnDefinitions>

			<TextBlock x:Name="lblGoal" Text="Goal" 
					   Grid.Row="0"
					   Grid.Column="0"
					   VerticalAlignment="Center"
					   Margin="20,0" TextAlignment="Left" FontSize="16" />

			<TextBox x:Name="txtGoal" 
					   Text="{Binding Goal, Mode=TwoWay}" 
					   TextWrapping="NoWrap" 
					   Grid.Column="1"
						Grid.Row="0"
					   VerticalAlignment="Center"
					   Margin="0" FontSize="16" />
			<TextBlock x:Name="lblPriority"
					   Text="Priority"
					   Grid.Row="1"
					   Grid.Column="0" 
					   VerticalAlignment="Center"
					   Margin="20,0" TextAlignment="Left" FontSize="16" />
			<ComboBox x:Name="cmbPriority" 
						ItemsSource="{Binding Priority,
								Mode=OneTime,
								Converter={StaticResource EnumToIEnumerableConverter}}"
						SelectedIndex="{Binding Priority,
								  Mode=TwoWay,
								  Converter={StaticResource EnumToIntConverter}}"
						Grid.Column="1"
						Grid.Row="1"
						Foreground="Black" 
						Height="30" FontSize="16" />

			<TextBlock x:Name="lblCost"
					   Text="Cost"
					   Grid.Row="2"
					   Grid.Column="0" 
					   VerticalAlignment="Center"
					   Margin="20,0" TextAlignment="Left" FontSize="16" />
			<TextBox x:Name="txtCost" 
					   Text="{Binding Cost, Mode=TwoWay, UpdateSourceTrigger=Explicit}" 
					   TextWrapping="Wrap" 
					   Grid.Row="2"
					   Grid.Column="1" 
					   VerticalAlignment="Center"                        
					   Margin="0"
					   FontSize="16" GotFocus="txtCost_GotFocus" />

			<CheckBox x:Name="chkDone"
					  IsChecked="{Binding Done, Mode=TwoWay}"
					  Content="Done"
					  Grid.Column="1"
					  Grid.Row="3" 
					  VerticalAlignment="Center"
						Margin="0"
						BorderThickness="0" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Left"
			/>
		</Grid>
		<Grid Grid.Row="2">
			<Grid.RowDefinitions>
				<RowDefinition Height="80" />
			</Grid.RowDefinitions>
			<StackPanel Orientation="Horizontal" Grid.Row="0">
				<Button x:Name="Ok" Content="Ok" Width="80" Height="30" Margin="40,0" Click="Ok_Click" IsDefault="True" />
				<Button x:Name="Cancel" Content="Cancel" Width="80" Height="30" Margin="40,0" Click="Cancel_Click" IsCancel="True" />
			</StackPanel>
		</Grid>		
	</Grid>

</Window>
