Blog Index
The journal that this archive was targeting has been deleted. Please update your configuration.
Navigation
« LittleWife™ | Main | Windows PHONE WEEKEND WORKSHOP - CAPE TOWN »
Sunday
Oct232011

applicationbar opacity in mango

In mango, a common way of using the ApplicationBar is to minimize it and make it opaque. This minimizes the space used and also hints to the user that their is more content to scroll thru.

TheUnderGround_10-23-2011_21.3.46.288

One “trick” the OS uses is to make the menu non-opaque when expanded

TheUnderGround_10-23-2011_21.3.50.682

Here is how to do this, set your applicationBar’s opacity and attach the StateChanged event handler

<phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar Opacity="0.9" Mode="Minimized" StateChanged="ApplicationBar_StateChanged">
        <shell:ApplicationBarIconButton IconUri="/Images/appbar.refresh.rest.png" Text="refresh" x:Name="refreshButton" Click="refreshButton_Click" />
        <shell:ApplicationBar.MenuItems>
            <shell:ApplicationBarMenuItem Text="about" x:Name="aboutButton" Click="aboutButton_Click" />
        </shell:ApplicationBar.MenuItems>
    </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

In this event handler, switch the opacity

private void ApplicationBar_StateChanged(object sender, Microsoft.Phone.Shell.ApplicationBarStateChangedEventArgs e)
{
    if (e.IsMenuVisible == true)
    {
        ApplicationBar.Opacity = 1.0;
    }
    else
    {
        ApplicationBar.Opacity = 0.9;
    }
}

Easy…

Reader Comments (12)

I would like to thank you for the efforts you've put in writing this blog. I'm hoping the same high-grade blog post from you in the upcoming also. Actually your creative writing skills has inspired me to get my own blog now. Really the blogging is spreading its wings fast. Your write up is a great example of it.louis vuitton damier replica

November 25, 2011 | Unregistered Commenterlouis vuitton outlet _lisa

I appreciate, cause I found {exactly|just} what I was looking for. {You have|You've} ended my {4|four} day long hunt! God Bless you man. Have a {nice|great} day. Hublot replica watches

November 30, 2011 | Unregistered Commenterhublot replica watches

thank for share,To recommend to you the replica patek philippe watches , replica tag heuer link and Breitling Navitimer replica Articles.

December 2, 2011 | Unregistered Commenterwuming

I like what you guys are up also. Such smart work and reporting! Carry on the excellent works guys I’ve incorporated you guys to my blogroll. I think it will improve the value of my web site :)louis vuitton designer sunglasses

Unique Patek Philippe replica watches are accessible in the best quality. Luxury Patek Philippe replica watches can fit to all your necessities. These watches have the equivalent design as the original Patek Philippe watches, and Patek Philippe replica watches are available in extremely conveniently and affordably priced. iwc replica

December 6, 2011 | Unregistered Commenteriwc replica

A person essentially help to make seriously posts I would state. This is the first time I frequented your website page and thus far? I amazed with the research you made to make this particular publish incredible. Great job! Louis Vuitton monogram canvas

You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I will try to get the hang of it!louis vuitton wallets

December 13, 2011 | Unregistered Commenterlouis vuitton wallets

Your post was so wonderful that I decided to bookmark this site,
so I can easily access this blog for further updates.cheap louis vuitton scarves

December 21, 2011 | Unregistered Commenterrolex

I like your article,looking forwar to learning breitling navitimer
more in the future.And I will also gona posting here to share my opinion.

December 21, 2011 | Unregistered CommenterSkyvsGrubby

fsdfsdfsdf sdfsd fsda fsa

December 31, 2011 | Unregistered Commentersdfsdf

Thank you!

So simple yet adds a really nice touch.

February 11, 2012 | Unregistered CommenterKenny Thompson

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>