XAML のいずれかで、2 つの方法:
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar BackgroundColor="White" ForegroundColor="Black">
<shell:ApplicationBar.Buttons>
<shell:ApplicationBarIconButton Text="A button" IconUri="/Assets/AppBar/new.png" />
</shell:ApplicationBar.Buttons>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
またはコードビハインドで:
using System.Windows.Media;
...
ApplicationBar.ForegroundColor = Colors.Black; // Icon and text color
ApplicationBar.BackgroundColor = Colors.White; // Application bar background color
基本的BackgroundColor
に、アプリケーション バーの背景色をForegroundColor
設定し、アイコンとテキストの色を設定します。これらを設定すると、テーマの設定に関係なく値が保持されます。
opacity
デフォルト値は 1 (完全に不透明) であるため、を設定する必要はありません。