<ContentPage.Resources>
<ResourceDictionary>
<animations:StoryBoard x:Key="FadeInLogo" Target="{x:Reference Logo}">
<animations:FadeToAnimation Opacity="1" Duration="700" />
</animations:StoryBoard>
</ResourceDictionary>
<ContentPage.Resources>
那么
<ContentPage.Triggers>
<EventTrigger Event="Appearing">
<triggers:BeginAnimation Animation="{StaticResource FadeInLogo}" />
然而
当我试图通过DataTrigger调用同一个动画时,编译器说需要TargetType属性来创建DataTrigger对象???
<DataTrigger Binding="{Binding IsOkToLogin}" Value="true" >
<DataTrigger.EnterActions >
<triggers:BeginAnimation Animation="{StaticResource FadeInLogo}"></triggers:BeginAnimation>
</DataTrigger.EnterActions>
</DataTrigger>