更改StoryBoard(WPF)中的ColumnDefinition? [英] Changing ColumnDefinitions in a StoryBoard (WPF) ?
本文介绍了更改StoryBoard(WPF)中的ColumnDefinition?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们.
我们可以通过WPF中的StoryBoard更改ColumnDefinitions吗?
例如:我想更改以下ColumnDefinitions
Hi friends.
Can we change ColumnDefinitions via a StoryBoard in WPF?
e.g : I wanna change the following ColumnDefinitions
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Height="0*"/>
</Grid.ColumnDefinitions>
到这个:
to this one :
<Grid.ColumnDefinitions>
<ColumnDefinition Height="0.585*"/>
<ColumnDefinition Height="0.415*"/>
</Grid.ColumnDefinitions>
预先谢谢您.
Thanks in advance.
推荐答案
是的,您可以做到,但是其中涉及一些棘手的事情.您必须为GridLength数据类型创建一个自定义动画.幸运的是,这种骗术已经被别人完成了.查看 WPF教程-第2部分:编写自定义动画类文章,该文章正是您想要的.
Yep, you can do that, but there is some tricky stuff involved. You have to create a custom animation for the GridLength data type. Lucky for you, that trickery has already been done by somebody. Look at the WPF Tutorial - Part 2 : Writing a custom animation class article, which does exactly what you want.
这篇关于更改StoryBoard(WPF)中的ColumnDefinition?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文