Most likely, you should inherit from ViewRenderer and provide CardContainer as a native type of view. Then override the ViewRenderer OnElementChanged method and create a new CardContainer for the renderer. Below is a short version to get you started.
Registration:
[assembly: ExportRenderer(typeof(SwipeableCard), typeof(SwipeableCardRenderer ))]
Class definition:
SwipeableCardRenderer : ViewRenderer<SwipeableCard, CardContainer>
OnElementChanged override:
if (this.Control == null) { this.SetNativeControl(new CardContainer(this.Context)); }
source share