3 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5 x:Class="Microsoft.Samples.Animation.TimingBehaviors.DataboundSliderAnimationExample"
9 <EventTrigger RoutedEvent="Button.Click" SourceName="myButton">
10 <EventTrigger.Actions>
13 <Storyboard FillBehavior="HoldEnd" >
15 FillBehavior="HoldEnd"
17 Storyboard.TargetName="MyAnimatedRectangle"
18 Storyboard.TargetProperty="Width"
20 To="{Binding ElementName=AnimationDestinationValueSlider, Path=Value}"
25 </EventTrigger.Actions>
30 <StackPanel Margin="20">
32 <TextBlock>Select a destination value:</TextBlock>
33 <Slider Name="AnimationDestinationValueSlider"
34 Orientation="Horizontal"
35 HorizontalAlignment="Left"
36 Minimum="25" Maximum="500"
39 Width="{Binding ElementName=AnimationDestinationValueSlider, Path=Value}"
40 Height="50" Fill="Red"
41 HorizontalAlignment="Left" Margin="0,10,0,0" />
43 <TextBlock Margin="0,30,0,0">Animated Rectangle</TextBlock>
44 <Rectangle Width="50" Height="50" Fill="Red" Name="MyAnimatedRectangle"
45 HorizontalAlignment="Left"
47 <Button Content="Trigger animation" Width="150" Height="40" Name="myButton"/>