Visual Studio でプロジェクトを作成し、アニメーションを実行できるように Blend で開いています。
StoryBoard を使用して 2 つのアニメーションを作成し、すべてのアニメーションを (Clic アクションで) 別のボタンに関連付けました。
私の問題は、アプリケーションを起動したときに 2 つのアニメーションが開始され、ボタンがトリガーされるまでそれらを停止することです。
どうすればそれを達成できますか?
EDIT
これは私のソースコードです。
<s:SurfaceWindow.Resources>
<Storyboard x:Key="StoryboardStart" x:Name="SBStrt">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image">
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="StoryboardStop" x:Name="STStp">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image">
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
そして、.csコンストラクターにはこれがあります
public SurfaceWindow1()
{
InitializeComponent();
// Add handlers for window availability events
AddWindowAvailabilityHandlers();
}