为什么不能在scrollview中直接添加一个image,然后使animation.begin()??
http://stackoverflow.com/questions/17267451/animation-cant-begin-in-scrollview-in-windows-phone
以上是我在SO中提的一个问题
我简单贴下代码,问题描述在上述网址中
<UserControl.Resources>
<Storyboard x:Name="Storyboard1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="my_combo_pic">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="80"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="my_combo_pic">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources> ...
<ScrollViewer x:Name="my_combo" Tap="MyCombolIconTapped" HorizontalAlignment="Right" Height="80" Margin="0" VerticalAlignment="Bottom" Width="80">
<Image x:Name="my_combo_pic" Stretch="Fill" Source="/Images/my_combo_icon.png" RenderTransformOrigin="0.5,0.5" Height="160" Width="80">
<Image.RenderTransform>
<CompositeTransform/>
</Image.RenderTransform>
</Image>
</ScrollViewer>
</Grid>
最终动画在wp device上没有运作
虽然在blend中表现良好!
原因是:
http://msdn.microsoft.com/zh-cn/library/windowsphone/develop/jj206955%28v=vs.105%29.aspx
中
2. 创建情节提要并将其变成资源
Storyboard 是您存放动画对象的容器。您必须将
Storyboard 变成可用于要进行动画处理的对象的资源。下面的 XAML 演示如何将
Storyboard 变成根元素的资源(一个
StackPanel)。
<StackPanel x:Name="rootElement">
<StackPanel.Resources>
<!-- Animates the rectangle's opacity. -->
<Storyboard x:Name="myStoryboard">
<!-- Animation objects go here. -->
</Storyboard>
</StackPanel.Resources>
</StackPanel>
为什么不能在scrollview中直接添加一个image,然后使animation.begin()??的更多相关文章
- [Swift通天遁地]二、表格表单-(3)在表格中嵌套另一个表格并使Cell的高度自适应
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- Xcode7.2中如何添加一个Empty Application模板
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) Xcode 6.0正式版之后已经没有所谓的Empty Appl ...
- 在Qt项目中如何添加一个已有的项目作为子项目
新建一个子目录项目(具体方法参见<类似Visual Studio一样,使用Qt Creator管理多个项目,创建子项目>),然后需要添加的项目移动到该子目录项目目录下,再在其pro文件中添 ...
- mybaties中在xml中map添加一个list中的判断
if (uIds.size() > 0) { map.put("uIds", uIds); } else { map.put("uIds", null); ...
- Scrollview中嵌套ListView(自定义组件解决)
首先,ScrollView中只能放一个控件,一般都放LinearLayout,orientation属性值为vertical.在LinearLayout中放需要呈现的内容.ListView也在其中,L ...
- WPF-在Grid中编程添加控件
摘要: 在Grid中编程添加控件,布局控件的位置用到的代码是: gridLayout.Children.Add(textblock); Grid.SetRow(textblock, ); Grid.S ...
- Android学习之——如何将GridView内嵌在ScrollView中
最近在做一个项目,有一个需求是在ScrollView中内嵌一个GridView. 刚开始,我是以为能直接内嵌在里面: <ScrollView android:layout_width=" ...
- CC2540 OSAL 学习其中原理,以及 给任务 添加 一个事件(定时发送串口消息)
参考学习大神博客: http://blog.csdn.net/feilusia/article/details/51083953 : http://blog.csdn.net/xiaoleiacmer ...
- Virtualbox中Linux添加新磁盘并创建分区
原文:https://www.linuxidc.com/Linux/2017-01/139616.htm ----------------------------------------------- ...
随机推荐
- 基于stm32f103zet6的FAT16文件系统学习0(读SD卡扇区)
SD卡已经看了两天了,主要是因为测试出来的卡容量不对,所以一直找原因,最终还是发现了,总比不过是单位上面出现了问题,或许是之前没有接触到SD的缘故吧,所以对其中的一些寄存器很不了解,一切都是重新开始, ...
- 电子工程师名片——UFI Command,USB盘符的显示
USB Mass Storage类规范概述 USB Mass storage Device协议即海量存储设备协议适用于硬盘,U盘等大容量存储设备.协议使用的接口端点有BulkIn.Bul ...
- 《how to design programs》12章函数复合
我们写代码时要学会适应辅助函数.作者提出了一个问题,如何对一个表排序.排序函数读取一个表,产生另一个表.排序函数的合约和用途如下: (sort empty) ;; expected value: em ...
- java设计模式--创建模式--原型模式
原型模式: 原型模式 概述 用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象. 适用性 .当一个系统应该独立于它的产品创建.构成和表示时. .当要实例化的类是在运行时刻指定时,例如,通过 ...
- C#中Split分隔字符串的应用(C#、split、分隔、字符串)
转载地址 .用字符串分隔: using System.Text.RegularExpressions; string str="aaajsbbbjsccc"; string[] s ...
- UESTC_邱老师选妹子(二) 2015 UESTC Training for Dynamic Programming<Problem I>
I - 邱老师选妹子(二) Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Su ...
- NicEdit - WYSIWYG Content Editor, Inline Rich Text Application
NicEdit - WYSIWYG Content Editor, Inline Rich Text Application By calling the nicEditors.allTextarea ...
- Mac 删除Openfire
首先,确保你已经关掉了openfire 打开终端 (在应用程序-->实用工具-->) 输入以下命令 sudo rm -rf /Library/PreferencePanes/Openfir ...
- cloudstack4.4新增功能前瞻
cloudstack4.4.0新功能前瞻 转载请注明地址:http://blog.csdn.net/zt689/article/details/37698989 1. cloudstack4.4. ...
- 安装Oracle11后在SQL Developer启动时提示:enter the full pathname for the java.exe
1) Open the file ..\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf and add the following line to se ...