1
私はWPFにはかなり新しく、ストーリーボードを使って試しています。私がやりたいことは初めて見る時にストーリーボードを開始することです。 Activate Storyboard on Visibility Changedその質問にaccepted answerから撮影WPFストーリーボード(画像あり、開始時にボードが表示されます)
:任意のポインタを大幅に
私はWPFにはかなり新しく、ストーリーボードを使って試しています。私がやりたいことは初めて見る時にストーリーボードを開始することです。 Activate Storyboard on Visibility Changedその質問にaccepted answerから撮影WPFストーリーボード(画像あり、開始時にボードが表示されます)
:任意のポインタを大幅に
を高く評価し、それが
<Grid Name="GridLoading" Visibility="Hidden" >
<Image>
<Image.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard >
<Storyboard Name="LoadingStoryBoard" Completed="LoadingStoryBoard_Completed">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source"
Duration="0:0:4">
<DiscreteObjectKeyFrame KeyTime="0:0:0">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2a-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:1">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2b-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:2">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2c-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:3">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2d-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Grid>
)負荷時に表示されていないウィザードのステップだこれはと重複している
<Style x:Key="AnimationImageStyle" TargetType="{x:Type Image}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=IsVisible}"
Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity"
From="1.0" To="0.1"
Duration="0:0:0.5"
AutoReverse="True"
RepeatBehavior="0:0:2" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
ストーリーボードで<DataTrigger.EnterActions>
内のストーリーボードを交換してください。
経験豊富なユーザーへの質問:投稿を重複としてマークするにはどうすればよいですか?それとも、改造者のためだけですか?
ありがとうございます!私が今すぐ把握する必要があるのは、アニメーションが完了した時点でいくつかのコードを実行することだけです。Completed = "LoadingStoryBoard_Completed"は、スタイル要素の中にあると無効であるようです –