nKognito
nKognito

Reputation: 6363

AppBar not transparent during animation

I changed the opacity of AppBar to semi-transparent. The problem is that when the bar slides up from the bottom (during animation) - it isn't transparent, and become transparent only after a half second or something like that.

Is it normal behaviour?

Thank you

Upvotes: 0

Views: 375

Answers (3)

Saket
Saket

Reputation: 203

In Windows 8.1 , following code works for me:

<Page.TopAppBar>
        <AppBar  x:Name="homeMenuTop">
            <AppBar.Background>
                <SolidColorBrush Opacity="0.5"
                                 Color="Black" />
            </AppBar.Background>
 </AppBar>
</Page.TopAppBar>

Upvotes: 1

Zack Weiner
Zack Weiner

Reputation: 674

This is normal behavior. What happens is that there are a series of transitions applied to the AppBar element in order to give it the flyout effect. Because of this the property you are setting is not being applied until the animations are complete. There are a few ways to modify this ...

1 - Create a Template for the AppBar that defines the properties you wish to modify throughout the transition.

http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/a6c7f640-61c4-49c1-8e1a-3a2a07d3ddd1/

2 - Access the transitions themselves from code to Modify the properties you wish to change from with in the transition code

3- Create a Transition Collection in XAML as described here:

http://www.scottlogic.co.uk/blog/colin/2011/10/winrt-transitions-creating-fast-and-fluid-metro-uis/

Upvotes: 0

Mayank
Mayank

Reputation: 8852

you might want to edit the appbar transitions in Blend to achieve that.

Upvotes: 0

Related Questions