Tag: night mode

  • Xamarin.Forms: Prevent dark mode on iOS, Android

    This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

    To enforce light mode on the following platforms use this code

    iOS Solution

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

    <key>UIUserInterfaceStyle</key> 
    <string>Light</string>
    

    Android Solution

    Put this code into your MainAcitivity.cs

    AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;