所以我有这个GridViewColumn
:
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" x:Name="cd"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
我有这个ToggleButton
:
<ToggleButton x:Name="toggleButtonEnableOptions"
Checked="toggleButtonEnableOptions_Checked"
Unchecked="toggleButtonEnableOptions_Unchecked"/>
现在,当我的ToggleButton
是Checked
时,我希望名为cd的ColumnDefinition
用以下动画进行扩展:
<Storyboard x:Key="animation">
<DoubleAnimation Storyboard.TargetProperty="Height"
From="0" To="30"
DecelerationRatio=".9"
Duration="0:0:0.3" />
</Storyboard>
有什么想法吗?