Esempio n. 1
0
        protected override void UpdateThemeStyle()
        {
            var style = Specific.GetStyle(Element);

            if (string.IsNullOrEmpty(style))
            {
                return;
            }
            switch (style)
            {
            case SwitchStyle.Toggle:
            case SwitchStyle.Favorite:
            case SwitchStyle.CheckBox:
            case SwitchStyle.OnOff:
            case SwitchStyle.Small:
                Control.Style = style;
                break;

            default:
                Control.Style = SwitchStyle.Toggle;
                break;
            }
            ((IVisualElementController)Element).NativeSizeChanged();
            UpdateBackgroundColor(false);
            UpdateOnColor(false);
            UpdateColor();
        }
Esempio n. 2
0
        public static void SetPulsingStatus(BindableObject element, bool isPulsing)
        {
            string style = VisualElement.GetStyle(element);

            if (style == ProgressBarStyle.Pending)
            {
                element.SetValue(ProgressBarPulsingStatusProperty, isPulsing);
            }
        }