0
A
回答
2
沒有你,因爲它是一個依賴動畫可能不應該動畫一排的大小。如果您確實需要這樣做 - 將RowDefinition.Height
設置爲Auto
併爲該行內的內容設置動畫效果Height
。
0
我不確定我完全同意上面關於如何設置動畫行大小的說法,有幾種情況您可能想要完全摺疊行/列(即快照視圖)。
您可以使用以下故事板輕鬆地設置高度/寬度的動畫效果。
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" x:Name="LeftSpacerColumn" />
<ColumnDefinition Width="*" x:Name="QuoteColumn" />
<ColumnDefinition Width="75" x:Name="MiddleSpacerColumn" />
<ColumnDefinition Width="450" x:Name="ButtonSpacerColumn" />
<ColumnDefinition Width="100" x:Name="RightSpacerColumn"/>
</Grid.ColumnDefinitions>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Width)" Storyboard.TargetName="LeftSpacerColumn">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<GridLength>0</GridLength>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
相關問題
- 1. winrt autoupdate
- 2. winrt - System.UnauthorizedAccessException
- 3. WinRT OnSuspending
- 4. WinRT HttpClient塊splashdrop
- 5. WinRT中的WeekNumber
- 6. WinRT中的System.Reflection.Assembly.GetExecutingAssembly()
- 7. Winrt Bing地圖
- 8. WinRT Canvas Zoom
- 9. WinRT中的HttpUtility.HtmlDecode
- 10. WinRT Xaml StoryBoard
- 11. C#:在WinRT中
- 12. WinRT Z-Index頁
- 13. Grid.Effect in Winrt
- 14. WinRT中的BindingGroup
- 15. WinRT的MD5 hashage
- 16. WinRT的MaskedTextBox
- 17. WinRT CheckBox屬性
- 18. WinRT中的SQLCipher
- 19. WinRT ControlTemplate ItemsPanel
- 20. 在WinRT中
- 21. Autofac.Mef和WinRT
- 22. AppBarButtonSyle for WinRT
- 23. 在WinRT中
- 24. WinRT替代System.ComponentModel.TypeConverter
- 25. WinRT ScrollViewer繼承
- 26. zlib for WinRT?
- 27. ShareMediaTask爲WinRT
- 28. Catel MVR EventToCommand WinRT
- 29. WinRT中的System.Security.Cryptography.ProtectedMemory
- 30. Winrt WebView Http headers
這似乎沒有實際動畫。它只是立即跳到新的寬度。 – 2014-08-20 22:51:35