У меня есть Grid
с 2-мя рядами:как изменить высоту строки сетки в WPF с использованием раскадровки
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition />
<RowDefinition Height="Auto" x:Name="OtherContactsRow" />
</Grid.RowDefinitions>
Something here
</Grid>
и 2 Storyboard
ы:
<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'.
Любые решения?
Ответ здесь [http://www.codeproject.com/KB/WPF/GridLengthAnimation.aspx](http://www.codeproject.com/KB/WPF/GridLengthAnimation.aspx) – Alin