I have a Grid with 2 rows.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition />
<RowDefinition Height="Auto" x:Name="OtherContactsRow" />
</Grid.RowDefinitions>
Something here
</Grid>
and 2 storyboards
<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>
When I try to modify the height of the row named "OtherContactsRow" I received the following error :
'System.Windows.Media.Animation.DoubleAnimation' animation object cannot be used to animate property 'Height' because it is of incompatible type 'System.Windows.GridLength'.
Any solutions?