Exemplo n.º 1
0
        void OnThemeChanged(object sender, EventArgs e)
        {
            var picker        = (Picker)sender;
            int selectedIndex = picker.SelectedIndex;

            Theming.ChangeTheme(selectedIndex.ToString());
            var db = Services.XServices.Instance.GetService <Services.IDatabase>();

            db.WriteSetting("Theme", selectedIndex.ToString());
        }
Exemplo n.º 2
0
        async void Theme_Clicked(object sender, EventArgs e)
        {
            Frame bt = (Frame)sender;

            await FadeOutIn(bt);

            var action = await DisplayActionSheet(Services.TranslateExtension.TranslateText("choose_theme"), Services.TranslateExtension.TranslateText("cancel"), null, "Comos"
                                                  , "Siemens", "Light", "Black");

            if (action != Services.TranslateExtension.TranslateText("cancel"))
            {
                Theming.ChangeTheme(action);
                var db = Services.XServices.Instance.GetService <Services.IDatabase>();

                db.WriteSetting("Theme", action);
            }
        }