私はWindows Phone 7.1 Mangoアプリケーションを持っており、組み込みのテーマカラーをほとんどうまくオーバーライドしました。ただし、ユーザーが白のテーマを選択していて、ページの背景とアプリケーション バーが暗い場合、アプリケーション バーはレンダリングされ、白い背景でアニメーション化されるため、ちらつきが発生します。アニメーション化が完了すると、背景色が適切に暗い色に設定されます。
アプリ バーのアニメーションを無効にするか、最初のアニメーションの背景色を設定する方法はありますか?
ちらつきの問題のこのビデオ キャプチャを参照してください。
Xaml:
<phone:PhoneApplicationPage x:Class="AppBarFlickers.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
mc:Ignorable="d"
d:DesignWidth="480"
d:DesignHeight="728"
SupportedOrientations="Portrait"
Orientation="Portrait">
<Grid Background="Black">
<Button Content="Toggle App Bar"
Margin="100,185,100,0"
VerticalAlignment="Top"
Click="ButtonClick"
Foreground="White"
Background="Black"
BorderBrush="White" />
</Grid>
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar BackgroundColor="Black"
ForegroundColor="White">
<shell:ApplicationBarIconButton IconUri="/icon.png"
Text="Button 1" />
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
コードビハインド:
public partial class Page1
{
public Page1()
{
InitializeComponent();
}
private void ButtonClick(object sender, RoutedEventArgs e)
{
ApplicationBar.IsVisible = !ApplicationBar.IsVisible;
}
}