2012-10-28 2 views
0

Blend4에서 가장 쉬운 앱을 준비했습니다. 추가 된 스토리 보드, keyframe1에 textBox를 놓고 textBox를 이동하고 다른 키 프레임을 추가했습니다. 애니메이션은 스토리 보드의 Blend4 i 프레스 재생에서 작동하며 textBox가 움직입니다. 에뮬레이터를 실행했지만 그렇지 않습니다. 나는 심지어 선생님의 앱을 실행하여 애니메이션을 만들지도 않는다.Windows Phone 에뮬레이터에 애니메이션/동작이 전혀 표시되지 않습니다.

내가 실행하게하려면 어떻게해야할까요?

enter image description here

답변

0

어떻게 코드에서 애니메이션을 시작합니까?
F.E. 플립 애니메이션 :

XAML

<VisualStateManager.VisualStateGroups> 
     <VisualStateGroup x:Name="VisualStateGroup"> 
      <VisualState x:Name="ShowBack" > 
       <Storyboard > 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="FrontCover"> 
         <EasingDoubleKeyFrame KeyTime="0" Value="0"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/> 
        </DoubleAnimationUsingKeyFrames> 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="FrontCover"> 
         <EasingDoubleKeyFrame KeyTime="0" Value="0"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90"/> 
        </DoubleAnimationUsingKeyFrames> 
        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BackCover"> 
         <DiscreteObjectKeyFrame KeyTime="0:0:0.5"> 
          <DiscreteObjectKeyFrame.Value> 
           <Visibility>Visible</Visibility> 
          </DiscreteObjectKeyFrame.Value> 
         </DiscreteObjectKeyFrame> 
        </ObjectAnimationUsingKeyFrames> 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="BackCover"> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/> 
        </DoubleAnimationUsingKeyFrames> 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)" Storyboard.TargetName="FrontCover"> 
         <EasingDoubleKeyFrame KeyTime="0" Value="0"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/> 
        </DoubleAnimationUsingKeyFrames> 
       </Storyboard> 
      </VisualState> 

      <VisualState x:Name="ShowFront" > 
       <Storyboard > 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="BackCover"> 
         <EasingDoubleKeyFrame KeyTime="0" Value="0"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/> 
        </DoubleAnimationUsingKeyFrames> 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="BackCover"> 
         <EasingDoubleKeyFrame KeyTime="0" Value="0"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90"/> 
        </DoubleAnimationUsingKeyFrames> 


        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FrontCover"> 
         <DiscreteObjectKeyFrame KeyTime="0:0:0.5"> 
          <DiscreteObjectKeyFrame.Value> 
           <Visibility>Visible</Visibility> 
          </DiscreteObjectKeyFrame.Value> 
         </DiscreteObjectKeyFrame> 
        </ObjectAnimationUsingKeyFrames> 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="FrontCover"> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/> 
        </DoubleAnimationUsingKeyFrames> 
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)" Storyboard.TargetName="BackCover"> 
         <EasingDoubleKeyFrame KeyTime="0" Value="0"/> 
         <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/> 
        </DoubleAnimationUsingKeyFrames> 
       </Storyboard> 
      </VisualState> 


     </VisualStateGroup> 
    </VisualStateManager.VisualStateGroups> 


<Image x:Name="FrontCover" Source="{Binding TitleInfo.front_cover.Image}" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="None" Margin="5"> 
          <Image.RenderTransform> 
           <CompositeTransform/> 
          </Image.RenderTransform> 
          <Image.Projection> 
           <PlaneProjection/> 
          </Image.Projection> 
                   </Image> 
          <Image x:Name="BackCover" Source="{Binding TitleInfo.back_cover.Image}" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="None" Margin="5" Visibility="Collapsed" > 
          <Image.RenderTransform> 
           <CompositeTransform/> 
          </Image.RenderTransform> 
          <Image.Projection> 
           <PlaneProjection/> 
          </Image.Projection> 

          </Image> 
애니메이션 시작

CS 번호 :

VisualStateManager.GoToState (이 "ShowBack", true)를;

+0

시작한다고 가정 해 봅시다. 나는 그것을 블렌드의 스토리 보드에서 만들고 실행해야합니다. 내가 understend 애니메이션으로 – user1769735

+0

일부 이벤트로 시작해야합니다. 혼합 U 애니메이션 재생 메뉴를 실행, 재생 버튼을 누르십시오. 그렇다면 애니메이션에서 언제 어떻게 애니메이션을 시작해야할까요? 이 기사는 U에 도움이 될 수 있습니다. http://windowsphonegeek.com/articles/WP7-Animations-in-depthndash-Overview-and-Getting-Started이 예제를 살펴보십시오. – Vovich