public static void UpdateBackgoundColor(Theme theme, UIButton button) { if (button.Enabled) { CGSize gradientImageSize = new CGSize(button.Bounds.Width, button.Bounds.Height + 2); UIImage gradientImage = ImageUtils.GetGradientImage( theme.MainGradientStartColor.CGColor, theme.MainGradientEndColor.CGColor, gradientImageSize); button.BackgroundColor = UIColor.FromPatternImage(gradientImage); } else { button.BackgroundColor = theme.DisabledButtonColor; } }
public static void ApplyTheme(Theme theme, UIButton button) { button.SetTitleColor (UIColor.White, UIControlState.Normal); button.SetTitleColor (UIColor.White, UIControlState.Disabled); button.Font = theme.SausageContrinueButtonFont; }
void SetTheme(AppTheme themeType, Theme theme) { Settings.AppTheme = themeType; Theme.Current = theme; ThemeSelectorContainerView.Hidden = true; }