Skip to content

Instantly share code, notes, and snippets.

@QiMata
Created February 1, 2016 21:33
Show Gist options
  • Save QiMata/f3972d3b6c0781cc2190 to your computer and use it in GitHub Desktop.
Save QiMata/f3972d3b6c0781cc2190 to your computer and use it in GitHub Desktop.
The iOS renderer for ContentViewRoundedCorners control.
class ContentViewRoundedCornersRenderer : VisualElementRenderer<ContentView>
{
protected override void OnElementChanged(ElementChangedEventArgs<ContentView> e)
{
base.OnElementChanged(e);
if (e.OldElement != null)
{
return;
}
Layer.CornerRadius = ((ContentViewRoundedCorners) Element).CornerRadius;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment