Xamarin.Forms: Prevent dark mode on iOS, Android

To enforce light mode on the following platforms use this code

iOS Solution

Open up you info.plist file and add the following key:


Android Solution

Put this code into your MainAcitivity.cs

AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;

2 thoughts on “Xamarin.Forms: Prevent dark mode on iOS, Android”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.