重新激活应用程序时,有没有办法立即应用主题更改? 暗/光似乎与它开始时相同。
// Determine the visibility of the dark background.
Visibility darkBackgroundVisibility =
(Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"];
// Write the theme background value.
if (darkBackgroundVisibility == Visibility.Visible)
{
MessageBox.Show("background = dark");
}
else
{
MessageBox.Show("background = light");
}