zoukankan      html  css  js  c++  java
  • 很好玩的滚动效果

                     很好玩的滚动效果
                                      周银辉

    role.PNG

    你可以粘贴以下代码到XMLPad以查看动画效果:
    <Window
        
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x
    ="http://schemas.microsoft.com/winfx/2006/xaml"
        xml:lang
    ="zh-CN"
        xmlns:System
    ="clr-namespace:System;assembly=mscorlib"
        x:Name
    ="Window"
        Title
    ="Window1"
        Width
    ="640" Height="480">

        
    <Window.Resources>
            
    <Storyboard x:Key="Timeline1" RepeatBehavior="Forever">
                
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.StrokeDashOffset)">
                    
    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="100"/>
                    
    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="10"/>
                
    </DoubleAnimationUsingKeyFrames>
            
    </Storyboard>
        
    </Window.Resources>
        
    <Window.Triggers>
            
    <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="rectangle">
                
    <BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
            
    </EventTrigger>
        
    </Window.Triggers>

        
    <Grid x:Name="LayoutRoot">
            
    <Grid Margin="125,0,291,68" VerticalAlignment="Bottom" Height="113">
                
    <Rectangle Fill="{x:Null}" Stroke="#FF000000" StrokeDashCap="Square" StrokeDashOffset="100" StrokeEndLineCap="Square" StrokeLineJoin="Miter" StrokeStartLineCap="Flat" StrokeThickness="5" x:Name="rectangle">
                    
    <Rectangle.StrokeDashArray>
                        
    <System:Double>0</System:Double>
                        
    <System:Double>2</System:Double>
                    
    </Rectangle.StrokeDashArray>
                
    </Rectangle>
                
    <Button Margin="2,2,2,2" Content="Button"/>
            
    </Grid>
        
    </Grid>
    </Window>




  • 相关阅读:
    集合
    二维数组
    数组案例
    数组
    date time 和string
    if和for的案例
    if条件语句 for循环语句
    Windows Azure Mangement API 之 更方便的使用Mangement API
    Azure Table storage 之改进DynamicTableEntity类为其添加动态语言扩展
    Windows Azure Table storage 之 动态Table类 DynamicTableEntity
  • 原文地址:https://www.cnblogs.com/zhouyinhui/p/724363.html
Copyright © 2011-2022 走看看