次のように私がボタンを持っている:アニメーションが完了したらコマンドを正しく実行する方法は?
<Button x:Name ="Btn_Import" Grid.Row="33" Grid.Column="15" Grid.ColumnSpan="36" Grid.RowSpan="36" >
<Button.Template>
<ControlTemplate>
<Grid RenderTransformOrigin="0.5,0.5" x:Name="bg">
<Image x:Name ="import_image" Source="{Binding ImportBtnBaseImagePath}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="import_image" Property="Source" Value="{Binding ImportBtnOverImagePath}" />
</Trigger>
<Trigger Property="ButtonBase.IsPressed" Value ="True">
<!-- press effect -->
<Setter TargetName="bg" Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
<Button.Triggers>
<EventTrigger RoutedEvent="PreviewMouseDown" >
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Studio" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:2" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Completed">
<i:InvokeCommandAction Command="{Binding NavigateCommand}" CommandParameter="ImportButtonClickParmeters" />
</i:EventTrigger>
</i:Interaction.Triggers>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
私は、このボタンを2秒間フェードアウトするためにいくつかの他のコントロールにアニメーションをtrigerしたい、その後、アニメーションは 'を介して他のいくつかのビューをナビゲートするために完了したらNavigateCommand '。しかし、次のエラーが表示されます。
Additional information: Specified value of type 'System.Windows.Interactivity.EventTrigger' must have IsFrozen set to false to modify.
私の意見では、この質問は編集しないでくださいが、あなたの問題が異なるため、新しい質問をする必要があります。この質問をロールバックしてみてください(おそらく他の誰かがそれに興味を持っているかもしれません)。そして、新しいものを作成してください。 –
さて、私はそれを元に戻しました。私は新しい質問へのリンクを投稿します – Ivan
ここに私の新しい質問を見てください:http://stackoverflow.com/questions/36591570/how-to-speciafy-a-target-for-animation – Ivan