public static void ThemeOverlay() { if (!Window.IsPreloaded) { if (File.Exists(_themeFilePath)) { AddThemeOverlay(_themeFilePath); } if (Elementary.GetProfile() == "tv" && File.Exists(_tvThemeFilePath)) { AddThemeOverlay(_tvThemeFilePath); } } }
internal PreloadedWindow(bool useBaseLayout = true) : base("PreloadWindow") { s_precreated = this; if (useBaseLayout) { InitializeBaseLayout(); } WarmupWidgets(); BackButtonPressed += DummyHandler; BackButtonPressed -= DummyHandler; void DummyHandler(object sender, System.EventArgs e) { } if (Elementary.GetProfile() == "wearable") { WarmupWearableWidgets(); } }
static void Preload() { Elementary.Initialize(); Elementary.ThemeOverlay(); _ = new PreloadedWindow(); }