public static void ApplyStyle(this UIView view, IUIStylingsModel style) { if (style.BackgroundColor != null) { view.BackgroundColor = style.BackgroundColor.ToNative(); } if (style.BorderColor != null) { view.Layer.BorderColor = style.BorderColor.ToNative().CGColor; } if (style.BorderWidth != null) { view.Layer.BorderWidth = style.BorderWidth.Value; } if (style.CornerRadius != null) { view.Layer.CornerRadius = (float)style.CornerRadius; } if (style.TintColor != null) { view.TintColor = style.TintColor.ToNative(); } }
private void SetStylings() { _defaultColor = new CrossPlatformColor(237, 107, 149); _selectedColor = new CrossPlatformColor(237, 107, 149, 200); MainStyling = new UIStylingsModel { BackgroundColor = _defaultColor }; _incomeButtonColor = _defaultColor; _expensesButtonColor = _selectedColor; _transButtonColor = _defaultColor; }