Rotate in a circle, then flip, when clicked : Transform « Windows Presentation Foundation « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Windows Presentation Foundation » TransformScreenshots 
Rotate in a circle, then flip, when clicked
Rotate in a circle, then flip, when clicked
       
    
    
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Button Name="myAnimatedButton" Width="120" Height = "40" RenderTransformOrigin="0.5,0.5" Content = "OK"
      <Button.RenderTransform>
        <RotateTransform Angle="0"/>
      </Button.RenderTransform>

      <Button.Triggers>
        <EventTrigger RoutedEvent="Button.Click">
          <BeginStoryboard>
            <Storyboard>
              <DoubleAnimationUsingKeyFrames
                Storyboard.TargetName="myAnimatedButton"
                Storyboard.TargetProperty="(Button.RenderTransform).(RotateTransform.Angle)"
                Duration="0:0:2" FillBehavior="Stop">
                <DoubleAnimationUsingKeyFrames.KeyFrames>
                  <LinearDoubleKeyFrame Value="360" KeyTime="0:0:1" />
                  <DiscreteDoubleKeyFrame Value="180" KeyTime="0:0:1.5" />                
                </DoubleAnimationUsingKeyFrames.KeyFrames>
              </DoubleAnimationUsingKeyFrames>           
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Button.Triggers> 
    </Button>
</Page>

   
    
    
    
    
    
    
  
Related examples in the same category
1.RenderTransform sectionRenderTransform section
2.LayoutTransform sectionLayoutTransform section
3.Transformed Buttons with TranslateTransform X/YTransformed Buttons with TranslateTransform X/Y
4.Transformed Buttons with ScaleTransform and ScaleYTransformed Buttons with ScaleTransform and ScaleY
5.Transformed Buttons with SkewTransform and AngleYTransformed Buttons with SkewTransform and AngleY
6.Transformed Buttons with RotateTransform And AngleTransformed Buttons with RotateTransform And Angle
7.Animate Button RenderTransformAnimate Button RenderTransform
8.Animate Button LayoutTransformAnimate Button LayoutTransform
9.Translate TransformTranslate Transform
10.ScaleTransformScaleTransform
11.SkewTransform appliedSkewTransform applied
12.Applies a RotateTransform to the brush's Transform propertyApplies a RotateTransform to the brush's Transform property
13.TranslateTransform : LayoutTransform SampleTranslateTransform : LayoutTransform Sample
14.MatrixTransform SampleMatrixTransform Sample
15.Rotate Button Along the center and AngleRotate Button Along the center and Angle
16.Render Tranform
17.Rotate a ButtonRotate a Button
18.RotateTransform AppliedRotateTransform Applied
19.Rotation of content by using RotateTransformRotation of content by using RotateTransform
20.Object Transforms in WPFObject Transforms in WPF
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.