BeginTime设成相同的看看。 

解决方案 »

  1.   

    这确实是个很奇怪的问题。
    我在stackoverflow上找到的唯一相关的解释:Some of these top level properties on Window are a bit weird and don't behave the same way as other WPF properties because they're on the boundary of Win32.如果你必须要实现你想要的效果,有两种方法可以尝试。
    1. 尝试自已定义依赖属性,关联windows的Height and Width.
    2. 不使用Animation,自己用Timer去实现Height and Width的变化。
      

  2.   

    设置相同的BeginTime还是不行。我刚才试了。
      

  3.   

    我试了一下你第二段代码,动画的时候是同步的,不过要把"Loaded"改成"Window.Loaded",否则编译不过去。
      

  4.   

     - -~~~尝试了个比较简陋的方法。。
        <Grid Width="100" Height="100" x:Name="xx" SizeChanged="xx_SizeChanged_1">
            <Grid.Triggers>
                <EventTrigger RoutedEvent="Window.Loaded">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetProperty="Width" To="900" Duration="0:0:5" BeginTime="0:0:0" FillBehavior="HoldEnd" AutoReverse="False" />
                                <DoubleAnimation Storyboard.TargetProperty="Height" To="500" Duration="0:0:5" BeginTime="0:0:0" FillBehavior="HoldEnd" AutoReverse="False"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Grid.Triggers>
        </Grid>在sizeChanged事件里面去改window的宽高,不过会有黑边。。哎~~ 
      

  5.   

     Storyboard.TargetProperty="Height"  Storyboard.TargetProperty="Width" 使用这两个是不行的,用MarginProperty可以做到,我已经试过了