<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="EsriMapSamples.AddUser" mc:Ignorable="d" 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:c1="http://schemas.componentone.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Margin" Value="5" />
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Margin" Value="5" />
            <Setter Property="Height" Value="30" />
        </Style>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <TextBlock Text="First Name:" />
        <TextBox x:Name="txtFirstName" Grid.Column="1" Text="{Binding FirstName, Mode=TwoWay}" />
        <TextBlock Text="Last Name:" Grid.Row="1" />
        <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding LastName, Mode=TwoWay}" />
        <TextBlock Text="Email:" Grid.Row="2" Loaded="TextBlock_Loaded" />
        <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Email, Mode=TwoWay}" />
        <StackPanel Grid.Row="4" Grid.ColumnSpan="2" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button x:Name="btnCancel" Content="Cancel" Width="100" Click="btnCancel_Click" Margin="5" />
            <Button x:Name="btnOK" Content="Add Me" Width="100" Command="{Binding Source={StaticResource mainViewModel}, Path=AddUserCommand}" CommandParameter="{Binding}" Click="btnOK_Click" Margin="5" />
        </StackPanel>
    </Grid>
</UserControl>