Reputation: 6363
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
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
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.
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
Reputation: 8852
you might want to edit the appbar transitions in Blend to achieve that.
Upvotes: 0