using Bit.App.Pages; using System; using System.Reflection; using Xamarin.Forms; using Xamarin.Forms.StyleSheets; using Xamarin.Forms.Xaml; [assembly: XamlCompilation(XamlCompilationOptions.Compile)] namespace Bit.App { public partial class App : Application { public App() { InitializeComponent(); // TODO: Load theme? if(false) { #pragma warning disable CS0162 // Unreachable code detected Resources.Add( #pragma warning restore CS0162 // Unreachable code detected StyleSheet.FromAssemblyResource(IntrospectionExtensions.GetTypeInfo(typeof(App)).Assembly, "Bit.App.Css.dark.css")); } Resources.Add( StyleSheet.FromAssemblyResource(IntrospectionExtensions.GetTypeInfo(typeof(App)).Assembly, "Bit.App.Css.styles.css")); Resources.Add( StyleSheet.FromAssemblyResource(IntrospectionExtensions.GetTypeInfo(typeof(App)).Assembly, $"Bit.App.Css.{Device.RuntimePlatform.ToLowerInvariant()}.css")); MainPage = new TabsPage(); } protected override void OnStart() { // Handle when your app starts } protected override void OnSleep() { // Handle when your app sleeps } protected override void OnResume() { // Handle when your app resumes } } }