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
| <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" />
<RadioButton Height="16" Name="radioRep2" Width="120" Margin="10" Content="{Binding Path=response2}" Checked="radioRep2_Checked" />
<RadioButton Height="16" Name="radioRep3" Width="120" Margin="10" Content="{Binding Path=response3}" Checked="radioRep3_Checked" />
<RadioButton Height="16" Name="radioRep4" Width="120" Margin="10" Content="{Binding Path=response4}" Checked="radioRep4_Checked" />
</StackPanel>
<Canvas Margin="0,0,0,0" Height="110" Width="778" VerticalAlignment="Bottom">
<Canvas.RenderTransform>
<TranslateTransform x:Name="transform" Y="109"/>
</Canvas.RenderTransform>
<Canvas.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="transform" Storyboard.TargetProperty="Y" To="0" Duration="0:0:2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Canvas.Triggers>
<Rectangle Canvas.Top="0" Canvas.Left="0" Height="109" Width="778" Stroke="Black" VerticalAlignment="Bottom" Fill="Aqua" />
<Label Canvas.Top="50" Canvas.Left="10" Content="blablabla"/>
</Canvas>
</Grid>
</Window> |
Partager