2
我有一個使用Windows Phone 7.0 SDK構建的應用程序。我現在需要將該應用程序更新到Windows Phone 7.1 SDK。當我遷移應用程序時,我所有頁面的背景都變成了黑色。但是,當我使用7.0 SDK時,它們都是白色的(如預期的那樣)。我該如何解決?使用7.0 SDK,我的所有頁面被定義爲:Windows Phone - Styles.xaml +芒果轉換
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneBackgroundBrush}">
...
</Grid>
PhoneBackgroundBrush在Styles.xaml中定義。這個文件有以下幾點:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib">
<Color x:Key="PhoneBackgroundColor">#FFFFFFFF</Color>
<SolidColorBrush x:Key="PhoneBackgroundBrush" Color="{StaticResource PhoneBackgroundColor}"/>
</ResourceDictionary>
Styles.xaml在App.xaml中所示,此處引用:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
有什麼不對?我如何讓我的背景變回白色?