5

私はGrid2行あります:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="150"/>
        <RowDefinition />
        <RowDefinition Height="Auto" x:Name="OtherContactsRow" />
    </Grid.RowDefinitions>
    Something here
</Grid>

と 2Storyboard秒:

<Storyboard x:Key="MaximizedStoryboard">
    <DoubleAnimation From="20" To="150"  Duration="0:0:2"
                     Storyboard.TargetName="OtherContactsRow"
                     Storyboard.TargetProperty="Height" >    
    </DoubleAnimation>
</Storyboard>

<Storyboard x:Key="MinimizedStoryboard">
    <DoubleAnimation From="150" To="20" Duration="0:0:2"
                     Storyboard.TargetName="OtherContactsRow"
                     Storyboard.TargetProperty="Height">
    </DoubleAnimation>
</Storyboard>

という名前の行の高さを変更しようとするとOtherContactsRow、次のエラーが発生しました。

'System.Windows.Media.Animation.DoubleAnimation' animation object cannot be used to animate property 'Height' because it is of incompatible type 'System.Windows.GridLength'.

解決策はありますか?

4

1 に答える 1

-3

物件をお試しいただけActualHeightます。ですdouble

于 2010-01-07T00:53:51.987 に答える