silverlight2008. 8. 26. 14:15

blend에서 object를 선택후에 + 키를 누르면 timeline이 생긴다.... 이것을 flash 처럼 사용하여서 움직이게 한후

저장하면 xaml이 자동으로 생긴다.

이런식으로
<UserControl.Resources>
  <Storyboard x:Name="Storyboard1">
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnSearch" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="251"/>
   </DoubleAnimationUsingKeyFrames>
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnSearch" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-6"/>
   </DoubleAnimationUsingKeyFrames>
  </Storyboard>
  <Storyboard x:Name="Storyboard2">
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnSearch" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="343"/>
   </DoubleAnimationUsingKeyFrames>
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnSearch" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-3"/>
   </DoubleAnimationUsingKeyFrames>
  </Storyboard>
 </UserControl.Resources>
 <UserControl.Background>
  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
   <GradientStop Color="#FF000000"/>
   <GradientStop Color="#FFFFFFFF" Offset="1"/>
  </LinearGradientBrush>
 </UserControl.Background>

근데 이것만 한다고 되는게 아니다.....PAGE.XAML.CS 에서 Storyboard1.Begin();

이것을 해서 실행을 하면 플래시 처럼 된다.....

하지만 여러가지 효과는 어떻게 줄것인가...... 이건 머 사라지게 한다음 이것저것 해보면 되겠지.....ㅋㅋ

한번 해보자 flash 못지않은 게 될거 같은데.......

fade in fade out 효과는

투명도를 조절한다.

Posted by 동동(이재동)