更新时间:2023-01-27 17:26:35
有一个属性来测试这个,而不是比较实际的资源颜色.
There is a property to test for this, rather that comparing the actual resource color.
Visibility v = (Visibility)Resources["PhoneLightThemeVisibility"];
if (v == System.Windows.Visibility.Visible)
{
// Is light theme
}
else
{
// Is dark theme
}