[FrmControlStoryboardAction.xaml]


<UserControl

    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"

    mc:Ignorable="d"

    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" x:Class="RiaAction.FrmControlStoryboardAction"

    d:DesignHeight="300" d:DesignWidth="400">   

                  <UserControl.Resources>

                                   <Storyboard x:Name="Storyboard1">

                                                     <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">

                                                                       <EasingDoubleKeyFrame KeyTime="00:00:01" Value="359.852"/>

                                                                       <EasingDoubleKeyFrame KeyTime="00:00:02" Value="-0.078"/>

                                                     </DoubleAnimationUsingKeyFrames>

                                   </Storyboard>

                  </UserControl.Resources>   

    <Grid x:Name="LayoutRoot" Background="White">

 

              <Rectangle x:Name="rectangle" Stroke="Black" RadiusX="11" RadiusY="11" Margin="144,116,159,101" RenderTransformOrigin="0.5,0.5">

                               <Rectangle.RenderTransform>

                                                 <TransformGroup>

                                                                   <ScaleTransform/>

                                                                   <SkewTransform/>

                                                                   <RotateTransform/>

                                                                   <TranslateTransform/>

                                                 </TransformGroup>

                               </Rectangle.RenderTransform>

                               <Rectangle.Fill>

                                                 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

                                                                   <GradientStop Color="Black" Offset="0"/>

                                                                   <GradientStop Color="#FFF3D22A" Offset="1"/>

                                                                   <GradientStop Color="#FF0EDA57" Offset="0.004"/>

                                                 </LinearGradientBrush>

                               </Rectangle.Fill>

              </Rectangle>

              <Button Height="44" Margin="49,29,177,0" VerticalAlignment="Top" Content="클릭하면 돌아버립니다.">

                               <i:Interaction.Triggers>

                                                 <i:EventTrigger EventName="Click">

                                                                   <im:ControlStoryboardAction Storyboard="{StaticResource Storyboard1}"/>

                                                 </i:EventTrigger>

                               </i:Interaction.Triggers>

              </Button>

 

    </Grid>

</UserControl>

 

 















'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글

PlaySoundAction  (0) 2009.12.07
HyperlinkAction  (0) 2009.12.07
RemoveElementAction - 클릭하면 사라지는 동작  (0) 2009.12.07
GoToStateAction - 컨트롤 상태 변경 액션  (0) 2009.12.07
ChangedPropertyAction  (0) 2009.12.07
Posted by holland14
: