private void Paint(CurvedCornersLabel view) { // creating gradient drawable for the curved background _gradientBackground = new GradientDrawable(); _gradientBackground.SetShape(ShapeType.Rectangle); _gradientBackground.SetColor(view.CurvedBackgroundColor.ToAndroid()); // Thickness of the stroke line _gradientBackground.SetStroke(4, view.CurvedBackgroundColor.ToAndroid()); // Radius for the curves _gradientBackground.SetCornerRadius( DpToPixels(this.Context, Convert.ToSingle(view.CurvedCornerRadius))); // set the background of the label Control.SetBackground(_gradientBackground); }
private void Paint(CurvedCornersLabel view) { this.Layer.CornerRadius = (float)view.CurvedCornerRadius; this.Layer.BackgroundColor = view.CurvedBackgroundColor.ToCGColor(); }