<Window x:Class="ISET2018_WPF.Fen3"
        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:local="clr-namespace:ISET2018_WPF"
        mc:Ignorable="d"
        Title="Fen3" Height="450" Width="300">
    <Window.DataContext>
        <local:Personne ID="24" Pre="Simon" Nom="Blabla" />
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="2*" />
        </Grid.RowDefinitions>
        <StackPanel Name="Bibi">
            <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
                <TextBox Width="50" Text="{Binding Path=ID}" />
                <TextBox Width="50" Text="{Binding Path=ID, Mode=OneTime}" />
                <TextBox Width="50" Text="{Binding Path=ID, Mode=OneWay}" />
                <TextBox Width="50" Text="{Binding Path=ID, Mode=OneWayToSource}" />
                <TextBox Width="50" Text="{Binding Path=ID, Mode=TwoWay}" />
            </StackPanel>
            <TextBox Width="50" Text="{Binding Path=Pre, Mode=TwoWay}" />
            <TextBox Width="50" Text="{Binding Path=Nom, Mode=TwoWay}" />
            <Button Name="btnVerif" Content="Vérifier" Margin="5" Click="btnVerif_Click" />
            <Button Name="btnAssigner" Content="Assigner" Margin="5" Command="{Binding BoutonAssigner}" />
        </StackPanel>
        <StackPanel Name="BiBis" Grid.Row="1" Margin="10">
            <ListView Name="ListePersonnes" Height="100" Width="240" ItemsSource="{Binding Path=LstPers}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="120" Header="Prénom" DisplayMemberBinding="{Binding Pre}" />
                        <GridViewColumn Width="120" Header="Nom" DisplayMemberBinding="{Binding Nom}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <ListBox Name="lbPersonnes" Width="150" ItemsSource="{Binding Path=LstPers}" DisplayMemberPath="Nom" Margin="5"/>
        </StackPanel>
        <StackPanel Name="ZOneEdition" Margin="5">
            <TextBox Width="120" Template="{Binding ElementName=ListePersonnes, Path=SelectedItem.ID}" />
            <TextBox Width="120" Template="{Binding ElementName=ListePersonnes, Path=SelectedItem.Pre}" />
            <TextBox Width="120" Template="{Binding ElementName=ListePersonnes, Path=SelectedItem.Nom}" />
        </StackPanel>
    </Grid>
</Window>
