<Window x:Class="ISET2018_WPF.Fen2"
        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="Fen2" Height="450" Width="800">
    <Grid>
        <Grid.Resources>
            <!--2h30-->
            <RotateTransform x:Key="Rota" Angle="0"/>
            <local:Degre2Radian x:Key="Convertisseur" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Rectangle Fill="Red" Width="100" Height="50" >
            <Rectangle.RenderTransform>
                <RotateTransform Angle="{Binding ElementName=Barre, Path=Value}"
                                 CenterX="50" CenterY="25" />
            </Rectangle.RenderTransform>
        </Rectangle>
        <Rectangle Fill="Yellow" Width="50" Height="100" LayoutTransform="{StaticResource Rota}" />
        <Slider Name="Barre" Grid.Row="1" Minimum="0" Maximum="360" Value="{Binding Source={StaticResource Rota}, Path=Angle}" />
        <TextBox Grid.Row="2" TextAlignment="Center" Text="{Binding ElementName=Barre, Path=Value, Converter={StaticResource Convertisseur}}" />
        <TextBox Grid.Row="3" TextAlignment="Center" Text="{Binding Source={StaticResource Rota}, Path=Angle, Converter={StaticResource Convertisseur}}" />
        <!--2h55-->

    </Grid>
</Window>
