<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Ap_ICommand"
        Title="Notas alumnos" Height="200" Width="300">
  <Grid Background="LightSteelBlue">
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <StackPanel>
      <TextBlock Text="DNI: " Margin="10"/>
      <TextBlock Text="Asignatura: " Margin="7"/>
    </StackPanel>
    <StackPanel Grid.Column="1">
      <TextBox Name="ctDni" Margin="7" Text="{Binding Path=IdAlumno, UpdateSourceTrigger=PropertyChanged}" TextChanged="ctDni_TextChanged" />
      <ComboBox Name="lsdAsigs" Margin="7" SelectedItem="{Binding Path=NomAsignatura}" />
      <WrapPanel ItemWidth="100">
        <Button Name="btNota" Margin="7" Content="Nota"
                Command="{x:Static local:MainWindow.ordenMostrarNota}"
                CommandParameter="{Binding ElementName=lsdAsigs, Path=SelectedIndex}"/>
        <TextBlock Name="tbNota" Margin="7" Background="White"
                   Text="{Binding Path=Nota, ConverterCulture=es-ES}" />
      </WrapPanel>
      <TextBlock Name="tbError" Text="Error: " Margin="7" />
    </StackPanel>
  </Grid>
</Window>
