<Window x:Class="KellermanSoftware.ContactsModule.Views.EditContactDetailsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Contact Details" ShowInTaskbar="False" 
        WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow"
        Height="400" Width="300" MinHeight="400" MinWidth="300">
    <Grid Margin="5" FocusManager.FocusedElement="{Binding ElementName=nameTextBox}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Label Content="Name" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" x:Name="nameTextBox"
                 Text="{Binding Path=Name, Mode=TwoWay, 
                                UpdateSourceTrigger=PropertyChanged, 
                                ValidatesOnDataErrors=True}" />
        <Label Grid.Row="1" Content="Address" VerticalAlignment="Top" />
        <TextBox Grid.Row="1" Grid.Column="1" Height="100" MaxLength="0"
                 TextWrapping="Wrap" AcceptsReturn="True"
                 VerticalScrollBarVisibility="Auto"
                 Text="{Binding Path=Address, Mode=TwoWay}" />
        <Label Grid.Row="2" Content="City" VerticalAlignment="Center" />
        <TextBox Grid.Row="2" Grid.Column="1" 
                 Text="{Binding Path=City, Mode=TwoWay}" />
        <Label Grid.Row="3" Content="State" VerticalAlignment="Center" />
        <TextBox Grid.Row="3" Grid.Column="1"
                 Text="{Binding Path=State, Mode=TwoWay}" />
        <Label Grid.Row="4" Content="Postal Code" VerticalAlignment="Center" />
        <TextBox Grid.Row="4" Grid.Column="1"
                 Text="{Binding Path=PostalCode, Mode=TwoWay}" />
        <Label Grid.Row="5" Content="Country" VerticalAlignment="Center" />
        <TextBox Grid.Row="5" Grid.Column="1"
                 Text="{Binding Path=Country, Mode=TwoWay}" />
        <Label Grid.Row="6" Content="Email" VerticalAlignment="Center" />
        <TextBox Grid.Row="6" Grid.Column="1"
                 Text="{Binding Path=Email, Mode=TwoWay}" />
        <Label Grid.Row="7" Content="Phone" VerticalAlignment="Center" />
        <TextBox Grid.Row="7" Grid.Column="1"
                 Text="{Binding Path=Phone, Mode=TwoWay}" />
        <StackPanel Grid.Row="8" Grid.Column="1" Orientation="Horizontal" >
            <Button x:Name="saveButton" IsDefault="True" Content="Save" 
                    Click="SaveButton_Click" Command="{Binding Path=SaveCommand}" />
            <Button IsCancel="True" Content="Cancel" Margin="10,0,0,0" />
        </StackPanel>
    </Grid>
</Window>
