windows 7 手机倾斜效果?
如何在不使用列表框的情况下为日期选择器和堆栈面板添加 TiltEffect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何在不使用列表框的情况下为日期选择器和堆栈面板添加 TiltEffect?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
默认情况下,仅为
TiltEffect
启用ListBoxItems
和从ButtonBase
派生的控件。但是,您可以随时在代码中(例如在页面构造函数中)添加其他类型的控件,方法是:然后在 XAML 中:
有关效果以及如何扩展支持的类型的更多详细信息可以在此处找到:
http://windowsphonegeek.com/articles/Silverlight-for-WP7-Toolkit-TiltEffect-in-deep
By default, only
ListBoxItems
and controls that derive fromButtonBase
are enabled for theTiltEffect
. You can however add additional types of controls at any time in code (e.g. in your page constructor) by:And then in XAML:
More detailed info on the effect and how to extend the supported types can be found here:
http://windowsphonegeek.com/articles/Silverlight-for-WP7-Toolkit-TiltEffect-in-depth
我对 Silverlight 工具包的倾斜效果并不满意,尤其是它“神奇地”应用于基于类型的元素的方式。所以我写了一个替代方案。您还可以配置要应用的“倾斜”程度。源代码可以在这里找到:
地铁运动部分 #4:倾斜效果
然后,您可以单独将平铺应用到元素,如下所示:
其中整数指定要应用的倾斜程度。我建议使用相当低的值,本机效果非常微妙,但是人们往往在自己的silerlight应用程序中使其过于极端,Metro效果应该是微妙的,他们不应该对你大喊大叫!
I was not happy with the Silverlight toolkit tilt effect, especially the way that it is'magically' applied to elements based on type. So I wrote an alternative. You can also configure how much 'tilt' you want to apply. The sourcecode can be found here:
Metro in Motion Part #4: Tilt Effect
You can then individually apply tile to elements as follows:
Where the integer specifies how much tilt to apply. I would recommend using quite low values, the native effect is quite subtle, however people tend to make it far too extreme in their own silerlight applications, Metro effects should be subtle, they should not shout at you!
不确定它是否对您的控件有帮助,但我发现 Microsoft 提供的 TiltEffect 很有帮助: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff941108(v=vs.105).aspx
Not sure if it will help for your controls, but I found the TiltEffect provided by Microsoft to be helpful: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff941108(v=vs.105).aspx