Public Shared Property ApplicationTheme As ApplicationTheme
public static ApplicationTheme ApplicationTheme {get; set;}
Public Shared Property ApplicationTheme As ApplicationTheme
public static ApplicationTheme ApplicationTheme {get; set;}
{
//Gets the application's theme
var theme = FrameworkApplication.ApplicationTheme;
//ApplicationTheme enumeration
if (FrameworkApplication.ApplicationTheme == ApplicationTheme.Dark)
{
//Dark theme
}
if (FrameworkApplication.ApplicationTheme == ApplicationTheme.HighContrast)
{
//High Contrast
}
if (FrameworkApplication.ApplicationTheme == ApplicationTheme.Default)
{
//Light/Default theme
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)