You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The
application contains a form named frmMain that contains a button named btnSave.
You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirements:
* saveProgress is slightly visible after 0.2 seconds
* saveProgress is fully visible after 1 second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01<Storyboard x:Key=”animateProgress” TargetName=”saveProgress”>
02
03</Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?
A.
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=”Visibility”>
<DiscreteObjectKeyFrame KeyTime=”00:00:00″ Value=”{x:Static Visibility.Collapsed}” />
<DiscreteObjectKeyFrame KeyTime=”00:00:01″ Value=”{x:Static Visibility.Visible}” />
</ObjectAnimationUsingKeyFrames>
B.
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=”Visibility”>
<DiscreteObjectKeyFrame KeyTime=”0″ Value=”{x:Static Visibility.Collapsed}” />
<DiscreteObjectKeyFrame KeyTime=”1″ Value=”{x:Static Visibility.Visible}” />
</ObjectAnimationUsingKeyFrames>
C.
<DoubleAnimation Storyboard.TargetProperty=”Opacity” Duration=”00:00:01″ From=”0″ To=”1″ />
D.
<DoubleAnimation Storyboard.TargetProperty=”Opacity” Duration=”1″ From=”0″ To=”1″ />