English 中文(简体)
如何让Metro在运动倾斜效应中 对按钮起作用?
原标题:How to get Metro in Motion Tilt Effect to work on buttons?

我尝试在我的WP7应用程序中用Metro对按钮和摇篮的倾斜效应来控制按钮和摇篮,但无法使其发挥作用。它的工作是矩形和列表框项目,而不是按钮和摇篮项目。我认为它与将效果应用到框架元素有关,但我不确定。有人知道我需要改变Metro在运动源方面的什么才能让它在按钮和哈比蒂尔斯上发挥作用吗?

Metro in Motion 源于此http://www.scottlogic.co.uk/blog/colin/wp-content/uploads/2011/05/MetroInMotion4.zip

我试着在以上例子中直接添加一个按钮,但这个按钮也行不通。

问题回答

在您的工程中添加工具工具包引用。 然后在 < code> PhoneApplicationPage 标签中添加以下行

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
toolkit:TiltEffect.IsTiltEnabled="True"

现在所有可点击的元素都将产生倾斜效应。





相关问题
System.Json namespace missing from Windows Phone 7

During a Mix10 presentation, the presenter (Charlie Kindel) said that when writing Silverlight based apps for WP7 you get all of Silverlight 3.0 with some of Silverlight 4.0 mixed in. Why then is ...

Will Windows Phone 7 Support Multitasking third party apps

Obviously it s early days, I do not know whether this is information that is in the public domain or not yet, but... I have trawled through some of this site - http://www.windowsphone7series.com/ but ...

Windows Series Phone 7 "Cloud"

I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#...

Windows Phone 7 Tab Pages (page cycle)

I know.. I know, it s only a few hours old. But how the hell do you get the little page tabbing/cycle (forgot what the official name is) on the top of the page under the app title. MIX Keynotes made ...

Recording audio from the microphone in Windows Phone 7 Series

I m wondering if anyone has any code samples or links to documentation that demonstrate how to capture audio from the device s microphone on the new Windows Phone Series 7. I ve recently downloaded ...

Resources for Windows Phone 7 development [closed]

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they ...

热门标签