首页 > 其他分享 >WPF EventTrigger RoutedEvent BeginStoryboard Storyboard TargetProperty RepeatBehavior DoubleAnimati

WPF EventTrigger RoutedEvent BeginStoryboard Storyboard TargetProperty RepeatBehavior DoubleAnimati

时间:2024-12-30 13:53:42浏览次数:7  
标签:EventTrigger Storyboard C# BeginStoryboard AutoReverse Duration

<Window x:Class="WpfApp118.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp118"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Grid.Triggers>
            <EventTrigger RoutedEvent="Grid.Loaded">
                <BeginStoryboard>
                    <Storyboard TargetProperty="Opacity"
                                RepeatBehavior="Forever">
                        <DoubleAnimation Storyboard.TargetName="title1"
                                         BeginTime="0:0:1"
                                         From="0"
                                         To="1"
                                         Duration="0:0:1"
                                         AutoReverse="True"/>
                        <DoubleAnimation Storyboard.TargetName="title2"
                                         BeginTime="0:0:2"
                                         From="0"
                                         To="1"
                                         Duration="0:0:1"
                                         AutoReverse="True"/>
                        <DoubleAnimation Storyboard.TargetName="title3"
                                         BeginTime="0:0:3"
                                         From="0"
                                         To="1"
                                         Duration="0:0:1"
                                         AutoReverse="True"/>
                        <DoubleAnimation Storyboard.TargetName="title4"
                                         BeginTime="0:0:4"
                                         From="0"
                                         To="1"
                                         Duration="0:0:1"
                                         AutoReverse="True"/>
                        <DoubleAnimation Storyboard.TargetName="title5"
                                         BeginTime="0:0:5"
                                         From="0"
                                         To="1"
                                         Duration="0:0:1"
                                         AutoReverse="True"/>
                        <DoubleAnimation Storyboard.TargetName="title6"
                                            BeginTime="0:0:6"
                                            From="0"
                                            To="1"
                                            Duration="0:0:1"
                                            AutoReverse="True"/>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Grid.Triggers>
        <TextBlock HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   Opacity="0"
                   Name="title1">C#</TextBlock>
        <TextBlock HorizontalAlignment="Center"
           VerticalAlignment="Center"
           Opacity="0"
           Name="title2">CLR Via C#</TextBlock>
        <TextBlock HorizontalAlignment="Center"
          VerticalAlignment="Center"
          Opacity="0"
          Name="title3">Data Structure</TextBlock>
        <TextBlock HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Opacity="0"
            Name="title4">Operating System</TextBlock>
        <TextBlock HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Opacity="0"
            Name="title5">Database</TextBlock>
        <TextBlock HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Opacity="0"
            Name="title6">CPP</TextBlock>
    </Grid>
</Window>

 

 

 

 

 

 

 

 

 

 

标签:EventTrigger,Storyboard,C#,BeginStoryboard,AutoReverse,Duration
From: https://www.cnblogs.com/Fred1987/p/18640860

相关文章

  • WPF EventTrigger RoutedEvent Button.MouseEnter BeginStoryboard Storyboard Double
    //xaml<Windowx:Class="WpfApp117.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......
  • WPF EventTrigger BeginStoryboard TargetName TargetProperty DoubleAnimation From
    <Windowx:Class="WpfApp116.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • WPF ColorAnimation EventTrigger EventTrigger.Actions BeginStoryboard TargetPrope
       <Windowx:Class="WpfApp115.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......
  • WPF DoubleAnimation RepeatBehavior,Duration,SpeedRation,AutoReverse
    //xaml<Windowx:Class="WpfApp114.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......
  • Android studio出现uplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt foun
    Android编译KotlinSDK依赖包类重复冲突问题1、问题问题:gradle同步可以成功,但是编译运行时,出现以下异常。2、分析取以上内容中的一条进行分析可以看到在模块org.jetbrains.kotlin:kotlin-stdlib:1.8.20和org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21中存在重复的......
  • c++ chrono头文件内Duration 、time_point和Clock
    前言        http://t.csdnimg.cn/eprLZ中介绍了关于chrono的基本操作,本文来介绍chrono与其他类的关系。内容Duration    duration表示一段时间间隔template<classRep,classPeriod=std::ratio<1>>classduration        Rep表示持续时......
  • iOS LaunchScreen.storyboard启动白屏(不显示)
    最近接手一个项目,启动页用LaunchScreen.storyboard需要修改下启动图发现启动图替换了居然不显示正常的解决方法很简单:需要要加载的图片放在工程的根目录下,不要放到Assets中。结束吐槽下storyboard这东西问题太多尽量还是少用吧。 storyboard设置的图片,如果这图片放在......
  • 前端页面:用户交互持续时间跟踪(duration)user-interaction-tracker
    引言在用户至上的时代,精准把握用户行为已成为产品优化的关键。本文将详细介绍user-interaction-tracker库,它提供了一种高效的解决方案,用于跟踪用户交互的持续时间,并提升项目埋点的效率。通过本文,你将了解到如何在Vue、React以及其他框架中使用这个工具,助你更好地理解用......
  • 【Unity】EventTrigger各事件触发时机解释
    OnSelect():当鼠标按下了一个当前未在选中状态的UI时触发。如果一个UI已经被选中(成为焦点UI),那么再点击这个UI时,则不会再一次触发OnSelect。OnDeselect():在OnSelect()已经执行过之后,又选中了另外一个物体时,原有的物体就会触发OnDeselect(),取消选择。OnUpdateSelect():在......
  • 软考高级第四版备考--第8天(估算活动持续时间)Estimate Activity Durations
    定义:根据资源估算的结果,估算完成单项活动所需工作时段数的过程作用:确定完成每个活动所需花费的时间量说明:本过程需要在整个项目期间开展首先估算完成活动所需的工作量和计划投入该活动的资源数量然后结合项目日历和资源日历,据此估算出完成活动所需的工作时段(即活动持续时间)......