<Window x:Class="DlgDataTemplate"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DataTemplate" Height="300" Width="400">
  <Window.Resources>
    <DataTemplate x:Key="plantillaAlumno">
      <Border Name="bordeAlumno" BorderBrush="Blue" BorderThickness="1"
              Padding="7" Margin="7">
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
          </Grid.ColumnDefinitions>
          <TextBlock Grid.Row="0" Grid.Column="0" Text="Nombre: " />
          <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding XPath=nombre}" />
          <TextBlock Grid.Row="1" Grid.Column="0" Text="Dirección: " />
          <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding XPath=direccion}"/>
          <TextBlock Grid.Row="2" Grid.Column="0" Text="Estudios: " />
          <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding XPath=estudios}"/>
          <TextBlock Grid.Row="3" Grid.Column="0" Text="Beca: " />
          <CheckBox Grid.Row="3" Grid.Column="1" IsChecked="{Binding XPath=beca}" />
        </Grid>
      </Border>
      <DataTemplate.Triggers>
        <DataTrigger Binding="{Binding XPath=beca}" Value="True">
          <Setter TargetName="bordeAlumno" Property="BorderBrush" Value="LightGreen"/>
        </DataTrigger>
      </DataTemplate.Triggers>
    </DataTemplate>
  </Window.Resources>
  <Grid>
    <StackPanel>
      <TextBlock Name="tbTitulo" FontSize="20" Text="Lista de alumnos:"/>
      <ListBox Height="190" Width="350" Margin="10"
               ItemsSource="{Binding Source={StaticResource xmlAlumnos}}"
               ItemTemplate="{StaticResource plantillaAlumno}"
               HorizontalContentAlignment="Stretch">
      </ListBox>
    </StackPanel>
  </Grid>
</Window>
