locked
Flip Card Animation is not working properly when Button's PointOver State remain Activated.

    Question

  •  I am facing problems with flip car animation which is not working properly when its mouse point over state remains activated but it works perfect when its tapped two times and instantly change pointer position. Kindly Help me out as soon as possible.

    Code is here:

    Xaml:

            <Image Name="imgCapital" RenderTransformOrigin=".5,.5" Tag="1" Tapped="imgCapital_Tapped">
                <Image.Projection>
                    <PlaneProjection RotationY="0"/>
                </Image.Projection>
            </Image>
            <Image Name="imgSmall" RenderTransformOrigin=".5,.5" Tag="2" Opacity="1" Tapped="imgSmall_Tapped">
                <Image.Projection>
                    <PlaneProjection RotationY="-90"/>
                </Image.Projection>
            </Image>

    Storyboard:

        <Storyboard x:Name="FlipOpen">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imgCapital">
                <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="90"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imgSmall">
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-90"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="FlipClose">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imgCapital">
                <SplineDoubleKeyFrame KeyTime="0:0:0.4" Value="90"/>
                <SplineDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imgSmall">
                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="0:0:0.4" Value="-90"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>



    Thursday, April 23, 2015 5:34 AM

All replies

  • What do you mean by "work" and "not working"?

    What behavior do you expect and how is it different from what you actually get?

    How are you triggering the Storyboard?

    What is the mouse point over state you mention?

    Do you have two states attempting to set the same property?

    Thursday, April 23, 2015 5:57 AM
    Moderator
  • Actually i simply want flip card animation which is not working here in my code. When i tapped button to invoke animation its behavior not exactly flipping.  Its one side work properly but other collapsed suddenly not rotate if i keep mouse right at the button, but if i change mouse pointer at that very time after tapping it works properly. Mouse Pointer Over mean screen points where i tapped.

    Triggered Function is here:

      private void btnChangCase_Tapped(object sender, TappedRoutedEventArgs e)
            {
                if(isCaseChanged==false)
                {
                    isCaseChanged = true;
                    FlipOpen.Begin();
                }
                else if(isCaseChanged==true)
                {
                    isCaseChanged = false;
                    FlipClose.Begin();
                 }
            }

    Thursday, April 23, 2015 8:22 AM
  • Could Someone please help me out for that problem mentioned upper. 
    Monday, April 27, 2015 5:38 AM
  • If you need one-on-one support then you can open a case at http://aka.ms/storesupport .

    Bumping a post when you didn't get a response over the weekend is counterproductive and will delay further responses.

    I still don't understand the problem you are having. You will need to explain more clearly if you need help.

    Tuesday, April 28, 2015 5:18 AM
    Moderator