Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created November 10, 2017 19:32
Show Gist options
  • Save juucustodio/5c6203e81cc8da38261fa7fa8ed0aea7 to your computer and use it in GitHub Desktop.
Save juucustodio/5c6203e81cc8da38261fa7fa8ed0aea7 to your computer and use it in GitHub Desktop.
Example of BadgeView with circle box using custom renderer - http://julianocustodio.com/badgeview
using Xamarin.Forms;
namespace BadgeView
{
public class CircleBox : BoxView
{
// Corner radius property.
public static readonly BindableProperty CornerRadiusProperty =
BindableProperty.Create("CornerRadius", typeof(double), typeof(CircleBox), 0.0);
// Get and set the corner radius.
public double CornerRadius
{
get { return (double) GetValue(CornerRadiusProperty); }
set { SetValue(CornerRadiusProperty, value); }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment