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(); }
public static void SetPulsingStatus(BindableObject element, bool isPulsing) { string style = VisualElement.GetStyle(element); if (style == ProgressBarStyle.Pending) { element.SetValue(ProgressBarPulsingStatusProperty, isPulsing); } }