1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="460" Width="800" ResizeMode="NoResize" Loaded="Window_Loaded"
xmlns:c="clr-namespace:WpfApplication1">
<Grid>
<Label Height="25" Name="label_question" Background="Aqua" BorderThickness="0" Margin="152.5,128.75,152.5,0" VerticalAlignment="Top" Content="{Binding Path=questi}" />
<StackPanel Height="150" Margin="266,0,266,40" Orientation="Vertical" VerticalAlignment="Bottom" >
<RadioButton Height="16" Name="radioRep1" Width="120" Margin="10" Content="{Binding Path=response1}" Checked="radioRep1_Checked" Focusable="False" />
<RadioButton Height="16" Name="radioRep2" Width="120" Margin="10" Content="{Binding Path=response2}" Checked="radioRep2_Checked" Focusable="False" />
<RadioButton Height="16" Name="radioRep3" Width="120" Margin="10" Content="{Binding Path=response3}" Checked="radioRep3_Checked" Focusable="False" />
<RadioButton Height="16" Name="radioRep4" Width="120" Margin="10" Content="{Binding Path=response4}" Checked="radioRep4_Checked" Focusable="False" />
</StackPanel>
<Canvas Name="canvas" Margin="0,0,0,0" Height="110" Width="778" VerticalAlignment="Bottom" >
<Canvas.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="entrer" Y="109"/>
<TranslateTransform x:Name="sortir" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Canvas.Triggers>
<EventTrigger RoutedEvent="TextBox.TextChanged">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard Name="yes">
<DoubleAnimation Storyboard.TargetName="entrer" Storyboard.TargetProperty="Y" To="0" Duration="0:0:2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Button.Click">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="sortir" Storyboard.TargetProperty="Y" To="109" Duration="0:0:2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Canvas.Triggers>
<Rectangle Name="rectreponse" Canvas.Top="0" Canvas.Left="0" Height="109" Width="778" Stroke="Black" VerticalAlignment="Bottom" Fill="Aqua" />
<Label Name="label_reponse" Canvas.Top="50" Canvas.Left="10" Content="blablabla"/>
<TextBox Canvas.Top="10" Name="textcanva" Visibility="Hidden" />
<Button Canvas.Left="612" Canvas.Top="50" Height="23" Name="button_next" Width="75" Content="OK" Focusable="False" Click="button_next_Click" />
</Canvas>
</Grid>
</Window> |
Partager