0

我想在 WPF 中淡入和淡出三次。这是我的来源:

<Image Height="274" HorizontalAlignment="Left" Margin="307,6,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="469" Source="/Makeatest;component/iPhone_20.jpg">
            <Image.Triggers>
                <EventTrigger RoutedEvent="Window.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="image2"
                                             Storyboard.TargetProperty="Opacity" From="0" To="1" 
                                             Duration="0:0:1" BeginTime="0:0:0" AutoReverse="True" 
                                             RepeatBehavior="Forever"/>
                            <DoubleAnimation Storyboard.TargetName="image3"
                                             Storyboard.TargetProperty="Opacity" From="1" To="0" 
                                             Duration="0:0:1" BeginTime="0:0:0" AutoReverse="True" 
                                             RepeatBehavior="Forever"/>
                        </Storyboard>


                    </BeginStoryboard>
                </EventTrigger>
            </Image.Triggers>
        </Image>
        <Image Height="274" HorizontalAlignment="Left" Margin="307,6,0,0" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="463" Source="/Makeatest;component/iPhone_3.jpg"/>

        <Image Height="274" HorizontalAlignment="Left" Margin="307,6,0,0" Name="image3" Stretch="Fill" VerticalAlignment="Top" Width="463" Source="/Makeatest;component/삼성8-02.jpg"/>

我想淡入淡出三张图片。我怎样才能做到这一点?

4

1 回答 1

1
 <DoubleAnimation Storyboard.TargetName="image2"
                  Storyboard.TargetProperty="Opacity" From="0" To="1" 
                  Duration="0:0:1" BeginTime="0:0:0" AutoReverse="True" 
             -->  RepeatBehavior="3x"/> <-- 
于 2013-03-27T03:14:01.523 回答