I'm developing a WinUI 3 UWP app for Windows 11 and the app automatically defaults to the theme chosen by Windows. Is there any way to give the user the choice?
This is how you can change the theme for your whole application:
if (Window.Current.Content is FrameworkElement rootElement)
{
rootElement.RequestedTheme = ElementTheme.Light; //.Dark, .Default
}