WinUI - Event to Check if High Contrast was chosen

Anderson Rodrigues Cavalcante 316 Reputation points
2024-02-19T19:10:24.79+00:00

I have a WinUI application and I need to check if the user change the OS theme to High Contrast. I got this error when signed this event to identify if HighContrast was set. It is the same event to UWP, but in WinUI this error happens.

User's image

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
791 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,995 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
814 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,837 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 85,701 Reputation points
    2024-02-19T20:49:30.54+00:00
    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.