コード例 #1
0
        public static void LoadTheme(MaterialColor theme = null)
        {
            MaterialColor.SetOnCurrentResourceThemeColor(theme);


            var service = DependencyService.Get <IStatusBar>();

            service?.SetStatusBarColor(ThemeColors.PrimaryDark);
        }
コード例 #2
0
        //public static MaterialColor Style { get; private set; }

        public static void LoadTheme(MaterialColor theme = null)
        {
            var themeOrRandom = theme ?? MaterialColor.GetRandom();

            //App.Style = themeOrRandom;

            MaterialColor.SetOnCurrentResourceThemeColor(themeOrRandom);

            var service = DependencyService.Get <IStatusBar>();

            service?.SetStatusBarColor(themeOrRandom.Primary);

            //var service = DependencyService.Get<IStatusBar>();
            //service?.SetStatusBarColor(ThemeColors.BackgroundPage);
        }