简体   繁体   中英

WP7 Page navigation effect and button effect

I develop my first application for WP7. I have two questions :

  1. How can I get page navigation effect like "Settings" in WP7 ? When I navigate to my applications pages, there's no effect. How can I set an effect like WP7 native applications ?

  2. I create button with Image and text in like this :

      <Button x:Name="btnNew" Padding="0"> <StackPanel Orientation="Vertical"> <Image Source="/Images/Icons/appbar.favs.rest.png" /> <TextBlock Text="New" Style="{StaticResource PhoneTextSmallStyle}" Margin="12,0" /> </StackPanel> </Button> 

But when I hold my finger on my button, a white rectangle appear. Do I have to implement event to change my image and text color like WP7 native applications ? Which event one ?

  1. The Windows Phone Toolkit provides some nice transition animations that you can use. Take a look at their sample project for how to use them. If you don't like any of the toolkit animations, you can create your own in Expression Blend. There are plenty of tutorials out there for creating transition animations in Blend, a simple search on your favorite search engine should come up with some good results.

  2. If you want to change how the button appears in its Pressed state, you can do this in Expression Blend. Edit the template of the button and go the the States tab to view the button's visual states. Change the Pressed visual state to your liking.

I'm not sure of your level of familiarity with Blend so I left my answers somewhat vague. If you have specific questions regarding Blend I'll try to answer them.

Silverlight Windows Phone Toolkit中提供的动画的性能受到了一些批评,因此您可能要考虑Kevin Marshall的实现 ,该实现使用了稍微复杂一点的方法,但是如果看一下示例,它很容易合并到您自己的应用程序中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM