开发者

WP7 Page navigation effect and button effect

开发者 https://www.devze.com 2023-02-07 19:45 出处:网络
I dev开发者_开发知识库elop my first application for WP7. I have two questions : How can I get page navigation effect like \"Settings\" in WP7 ?

I dev开发者_开发知识库elop 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.


There has been some criticism over the performance of the animations provided in the Silverlight Windows Phone Toolkit, so you may want to consider Kevin Marshall's implementation, which uses an admittedly slightly more complex approach, but if you look at the sample it's easy enough to incorporate into your own application.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号