XAML C# WPF Best efficient way to do an ordered sequence of animations

前端 未结 1 731
误落风尘
误落风尘 2021-02-09 02:15

I would like to do a sequence of animations on a label, for example, first do opacity animations from values 0 to 1 and vice versa and just at the end of opacity animation and n

1条回答
  •  野性不改
    2021-02-09 02:50

    The easiest way is to define the entire animation in a single storyboard with suitable BeginTime and Duration properties. This way the entire animation can be started and stopped as a unit, but you can have different sequences.

    For example:

    
        
        
        
        
        
        
        
        
    
    

    This storyboard changes the values on the 3 rotate transforms for the first 4 seconds, but the opacity on the firstLetter item doesn't start to change until after one second has passed and it only runs for 2 seconds. The siteLink and siteLinkTop elements don't have their opacity changed until after 4 seconds (and the gear rotation animation has finished).

    0 讨论(0)
提交回复
热议问题