windows 7 手机倾斜效果?

发布于 2025-01-01 05:21:39 字数 45 浏览 4 评论 0 原文

如何在不使用列表框的情况下为日期选择器和堆栈面板添加 TiltEffect?

How to add TiltEffect for datepicker and stackpanel with out using listbox??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风和你 2025-01-08 05:21:39

默认情况下,仅为 TiltEffect 启用 ListBoxItems 和从 ButtonBase 派生的控件。但是,您可以随时在代码中(例如在页面构造函数中)添加其他类型的控件,方法是:

TiltEffect.TiltableItems.Add(typeof(StackPanel)); 

然后在 XAML 中:

<StackPanel toolkit:TiltEffect.IsTiltEnabled="true">
    ...

有关效果以及如何扩展支持的类型的更多详细信息可以在此处找到:

http://windowsphonegeek.com/articles/Silverlight-for-WP7-Toolkit-TiltEffect-in-deep

By default, only ListBoxItems and controls that derive from ButtonBase are enabled for the TiltEffect. You can however add additional types of controls at any time in code (e.g. in your page constructor) by:

TiltEffect.TiltableItems.Add(typeof(StackPanel)); 

And then in XAML:

<StackPanel toolkit:TiltEffect.IsTiltEnabled="true">
    ...

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

不必了 2025-01-08 05:21:39

我对 Silverlight 工具包的倾斜效果并不满意,尤其是它“神奇地”应用于基于类型的元素的方式。所以我写了一个替代方案。您还可以配置要应用的“倾斜”程度。源代码可以在这里找到:

地铁运动部分 #4:倾斜效果

然后,您可以单独将平铺应用到元素,如下所示:

<Button local:MetroInMotion.Tilt="6"/> 

其中整数指定要应用的倾斜程度。我建议使用相当低的值,本机效果非常微妙,但是人们往往在自己的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:

<Button local:MetroInMotion.Tilt="6"/> 

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!

分开我的手 2025-01-08 05:21:39

不确定它是否对您的控件有帮助,但我发现 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文