Xamarin Forms Light/Dark Without Custom Theme

785 Views Asked by At

Is there a way to change dark/light theme in Xamarin Forms without defining a custom theme?

For example, when I go into the iPhone simulator and toggle Settings -> Developer -> Dark Appearance, my app will change appearance. However, the code below by itself does not do this.

Application.Current.UserAppTheme = OSAppTheme.Dark;

I'd rather avoid reinventing both the system light and dark themes for every control in my app and stick to overriding system styles as needed.

Any way to do this?

0

There are 0 best solutions below