zoukankan      html  css  js  c++  java
  • WPF(1)Hello,WPF

    以下是一段简单的say hello动画,说是简单,可自己也费了九牛之力啊
    在Kaxaml中编辑, 用Xaml Hack 也可打开查看效果。由于对一些语法,属性还不熟悉,所以得借助Kaxaml所带的提示功能,比较郁闷的是这软件有时会因一些语法错误而导致直接退出

    <Page
      xmlns
    ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x
    ="http://schemas.microsoft.com/winfx/2006/xaml">

    <Canvas>  
      
    <Canvas.Triggers>
       
    <EventTrigger RoutedEvent="Canvas.Loaded">
        
    <EventTrigger.Actions>
            
    <BeginStoryboard>
              
    <Storyboard BeginTime="0" Duration="Forever">
                  
    <!-- "hello" Animation-->
                  
    <DoubleAnimation Storyboard.TargetName="hello" Storyboard.TargetProperty="(Canvas.Left)" From="0" To="500"  BeginTime="0:0:0" Duration="0:0:1.5" />
                  
    <DoubleAnimation Storyboard.TargetName="skew" Storyboard.TargetProperty="AngleX"  AutoReverse="True" DecelerationRatio="0.5" From="0" To="30"  BeginTime="0:0:1" Duration="0:0:0.8" />
                  
    <DoubleAnimation Storyboard.TargetName="hello" Storyboard.TargetProperty="(Canvas.Left)"  To="300"  BeginTime="0:0:3" Duration="0:0:0.5" />
                   
    <!-- "W" Animation-->
                 
    <DoubleAnimation Storyboard.TargetName="tbw" Storyboard.TargetProperty="(Canvas.Left)" From="350"  To="550"  BeginTime="0:0:3" Duration="0:0:0.35" />
                 
    <DoubleAnimation Storyboard.TargetName="tbw" Storyboard.TargetProperty="(Canvas.Top)" From="0"  To="180"  BeginTime="0:0:3" Duration="0:0:00.35" />
                    
    <!-- "P" Animation-->
                   
    <DoubleAnimation Storyboard.TargetName="tbp" Storyboard.TargetProperty="(Canvas.Left)" From="400"  To="700"  BeginTime="0:0:3.5" Duration="0:0:0.3" />
                 
    <DoubleAnimation Storyboard.TargetName="tbp" Storyboard.TargetProperty="(Canvas.Top)" From="0"  To="180"  BeginTime="0:0:3.5" Duration="0:0:0.3" />
                   
    <!-- "F" Animation-->
                  
    <DoubleAnimation Storyboard.TargetName="tbf" Storyboard.TargetProperty="(Canvas.Left)" From="450"  To="800"  BeginTime="0:0:4" Duration="0:0:0.3" />
                 
    <DoubleAnimation Storyboard.TargetName="tbf" Storyboard.TargetProperty="(Canvas.Top)" From="0"  To="180"  BeginTime="0:0:4" Duration="0:0:0.3" />
              
    </Storyboard>
            
    </BeginStoryboard>
        
    </EventTrigger.Actions>
      
    </EventTrigger>
    </Canvas.Triggers><!-- Insert this sample as the child of a Page, Grid, Canvas, Button, or other container -->  

      
    <TextBlock   x:Name="hello" Canvas.Top ="218" FontFamily="Segoe, Segoe UI, Arial" FontWeight="Bold" FontSize="80pt" Foreground="Chartreuse" Text ="Hello">
           
    <TextBlock.RenderTransform > 
             
    <SkewTransform x:Name="skew"  CenterX="50" CenterY="200" > </SkewTransform>
          
    </TextBlock.RenderTransform>
      
    </TextBlock>
       
    <TextBlock x:Name ="tbw" Text ="W"  FontSize ="100pt" FontWeight ="Bold"  Canvas.Top="-1000"></TextBlock>
       
    <TextBlock x:Name ="tbp" Text ="P"  FontSize ="100pt" FontWeight ="Bold" Canvas.Top="-1000" > </TextBlock>
       
    <TextBlock x:Name ="tbf" Text ="F"  FontSize ="100pt" FontWeight ="Bold" Canvas.Top="-1000" > </TextBlock>
    </Canvas>

    </Page>
  • 相关阅读:
    redis 安装和运行
    Django:django-debug-toolbar模块
    Django 的 logging日志文件配置
    Github之利用SSH完成Git与GitHu 的绑定
    4.输出1-100内的所有偶数
    3.输出1-100内的所有奇数
    2.求1-100的所有整数的和
    1.使用while循环输出1.2.3.4.5.6.....8.9.10
    将前台JS数组序列化后提交,后台反序列化对象
    div模拟下拉框
  • 原文地址:https://www.cnblogs.com/anders06/p/1151512.html
Copyright © 2011-2022 走看看