<controls:ChildWindow x:Class="ApRiaServices.VentanaNuevoAlumno"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:df="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
           Width="400" Height="160" 
           Title="Nuevo alumno">
  <Grid x:Name="LayoutRoot" Margin="2">
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <df:DataForm x:Name="dfNuevoAlumno"
                 AutoGenerateFields="False" AutoCommit="True"
                 AutoEdit="True" CommandButtonsVisibility="None">
      <df:DataForm.EditTemplate>
        <DataTemplate>
          <StackPanel>
            <df:DataField Label="ID">
              <TextBox Text="{Binding Id, Mode=TwoWay,
                NotifyOnValidationError=True,  ValidatesOnExceptions=True}" />
            </df:DataField>
            <df:DataField Label="Nombre">
              <TextBox Text="{Binding NomAlumno, Mode=TwoWay}" />
            </df:DataField>
          </StackPanel>
        </DataTemplate>
      </df:DataForm.EditTemplate>
    </df:DataForm>

    <Button x:Name="CancelButton" Content="Cancelar"
            Click="CancelButton_Click" Width="75" Height="23"
            HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
    <Button x:Name="OKButton" Content="Aceptar"
            Click="OKButton_Click" Width="75" Height="23"
            HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
  </Grid>
</controls:ChildWindow>
